In this article, we will have explained the necessary steps to install and setup Memcached on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.
Memcached is a free & open-source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches.
Install Memcached on Debian
Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.
Step 2. Install Memcached.
Memcached is available in Debian repositories. Install Memcached on Debian using following command:
Once the installation is completed, the Memcached service will start automatically. To check the status of the service, enter the following command:
Step 3. Configure Memcached.
Before configuring Memcached, you need to ensure that it is listening to the local interface 127.0.0.1. For default level configuration, we will check for the following settings under the Memcached configuration file found in
Set or update parameters as follows, customizing them to your needs:
This is a brief description of the parameters:
Restart the Memcached service for the changes to take effect:
Step 4. Install the Memcached PHP Extension.
To connect Memcached to your PHP application, you need to install the php-memcached extension with the command below:
Step 5. Install the Memcached Python Extension.
To connect Memcached to interact with your Python application, you can install your preferred library using pip:
Congratulation, you have learned how to install and configure Memcached on Debian Buster. If you have any question, please leave a comment below.