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.
Previously I have written about how useful public cloud storage can be when starting a…
This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…
For many software teams, documentation is written after features are built and design decisions have…
With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…
Open source libraries are repositories of code that developers can use and, depending on the…
Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…