The following guide describes how to install Memcached on a Debian system 11.
Memcached is a data and object caching system, which can significantly reduce the time needed to obtain data from the database by caching them.
The following guide is a perfect complement to our server LAMP in order to accelerate it.
We start the terminal
we are installing the memcached package
apt-get install memcached libmemcached-tools -y
apt-get install python3-pymemcache libcache-memcached-libmemcached-perl -y
We run it in the system:
systemctl start memcached
systemctl enable memcached
We check the status of the service:
systemctl status memcached
Now we will do the configuration.
Basic Memcached configuration
The Memcached configuration file is /etc/memcached.conf.
Basic configuration parameters:
-m - the maximum amount of memory dedicated to Memcached. (by default: 64 MB)
-p - The port on which Memcached is listening. (by default: 11211)
-l - IP address on which the Memcached service is listening by default localhost (127.0.0.1). To listen on all interfaces use 0.0.0.0.
we configure as follows:
nano /etc/memcached.conf
-l 127.0.0.1
-U 0
-p 11211
-u memcache
-m 2000
After making the changes, we restart the service:
systemctl restart memcached
We install the memcached extension for PHP in the system.
apt-get install php-memcached
Memcached should now be available on php.info and should work fine on the server.
We are also reloading the Apache server.
service apache2 restart
the server for this guide was provided by statnet.pl https://www.statnet.pl/vps/root-vps/
Below is the video:
Poniższy poradnik opisuje jak w bardzo szybki sposób za pomocą polecenia dd sprawdzimy szybkość naszego…
Installing Laravel on servers with DirectAdmin panel: poniżej bardzo prosty sposób na instalację na naszych…
Below is a very simple trick to delete all .listing files from directories and their subdirectories. użyjemy…
The guide below shows how to check the temperature in the Raspberry Pi in just a few seconds. Polecenie…
Today we will introduce you to the first tutorial on how to install Debian. We will show you throughout the series, w jaki sposób…
The following method describes a very simple way to check the operation of the CPU frequency of our Raspberry PI. Całość…