Memcached is an in-memory caching application for Linux. It acts as a store of keys and values in which information is stored in memory only to speed up applications. Many CMS systems such as WordPress and Drupal support Memcached to speed up the delivery of web pages. In this article, we will learn how to install Memcached on Debian 10.
Installing Memcached on Debian 10
To install Memcached on Debian 10 you need to follow these steps:
We know that most of the operations in the Linux operating system are done through the terminal. Since we are running Debian 10, which is also a Linux flavor, we will need to launch a terminal to install Memcached on it. To do this, all we have to do is click on the Actions tab located on the Debian 10 desktop and then type terminal in the appropriate search bar. Finally, click on the terminal search result to open a terminal window as shown in the image below:
Now you need to update your Debian 10 system so that you are ready to install the Memcached memory caching system on it. To do this, enter the following command in the terminal and press the Enter key:
sudo apt update
This command will take some time to complete as it requires updating all relevant packages before actually installing. This is also shown in the following image:
Once all the required packages have been updated, you can see the result shown in the image below on your terminal:
Now, to install Memcached on Debian 10, type the following command in the terminal and press Enter:
sudo apt install memcached libmemcached-tools
This command will install Memcached along with the libmemcached-tools package, which provides all the necessary tools to interact with this system. This command is shown in the following image:
During this process, you will be asked for your consent, i.e. whether you want to proceed with the installation or not. Enter “Y” into your terminal and then press the Enter key to confirm your consent, as shown in the image below:
Memcached has been successfully installed on your system. Now you need to check if it works. To do this, you will need to start this service. Type the following command in the terminal and press Enter:
sudo systemctl start memcached
This command is also shown in the image below:
After you run this command, the Memcached service will start working, and to verify, enter the following command in your terminal and press Enter:
sudo systemctl status memcached
Running this command will show the status of the Memcached service.
Once this command is successful, you should be able to see that the Memcached service is active and running, as shown in the image below:
You can also stop this service anytime you want by typing the following command in your terminal and pressing the Enter key:
sudo systemctl stop memcached
When you run the status command again, you will see that the status of the Memcached service is now Inactive and Dead, which will indicate that it has stopped working, as shown in the image below:
By following the simple method outlined in this article, you can easily install and enable the Memcached service on Debian 10, and therefore improve the performance of the applications you run on your Debian 10 system.
How to install Memcached on Debian 10