In this guide, two different methods of the installation of Memcached have been discussed in detail, along with its basic configuration on Ubuntu.
There are two different methods for the installation of Memcached on Ubuntu either from its default repository by using the apt package manager or by downloading its tar package from its official website.
The first and simple method to install Memcached on Ubuntu is by installing it from its default repository, for which we will use the apt package manager:
To confirm the successful execution of the above command, we will find out the installed version details of Memcached by using the command:
Using the systemctl command, we will check the status of memcached:
To uninstall the memcached from Ubuntu with all its configuration files, we will use the purge command with apt package manager:
Another method to install the the Memcached on Ubuntu is by downloading its zipped package from its official website using the wget command:
Unzip the zipped file to access its contents by using the command:
List down the contents of the directory to confirm the file has been unzipped:
Navigate to the memcached-1.6.15 directory using the cd command:
Now install the libevent-dev package because it is the dependency of memcached:
Now we will configure, compile all the files using the make command and then install all the compiled files:
For configuration, we will open its config file using any text editor:
Now change the IP address in the configuration file with your IP address, for example, our IP address is 10.0.2.15:
Stop the Memcached service by using the systemctl command:
Now again start the service:
Also enable the service of the Memcached on your system:
And allow the traffic on your IP address at port 11211 using the ufw command:
There are multiple methods to connect with Memcached.
If your application is PHP based such as WordPress, Joomla, or Drupal and you want to connect Memcached as caching database then install php-memcached through the command:
For Python based applications:
Memcached is an open-source application that is used to run php-based dynamic web applications by reducing the load on their databases so that it can speed the performance of those applications. In this write-up, we have explored two installation methods of Memcached on Ubuntu one by using the default repository and the other by downloading its zipped package from its website.
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…
Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…