Redhat / CentOS Install Memcached Caching System

To install Memcached caching system on Redhat/CentOS, you can follow these steps:

  1. Update the system’s package cache using the following command:
sudo yum update
  1. Install Memcached and its dependencies by running the following command:
sudo yum install memcached libmemcached
  1. Start the Memcached service and enable it to start automatically at boot time using the following commands:
sudo systemctl start memcached
sudo systemctl enable memcached
  1. Verify that Memcached is running by running the following command:
sudo systemctl status memcached

You should see output indicating that the service is active and running.

  1. Configure Memcached to suit your needs. Memcached’s configuration is located in the /etc/sysconfig/memcached file. You can edit this file to adjust the amount of memory used by Memcached, the port it listens on, and other settings. For example, to change the amount of memory used by Memcached to 128MB, you can modify the -m parameter as follows:
OPTIONS="-l 127.0.0.1 -U 11211 -m 128"
  1. Restart the Memcached service for the configuration changes to take effect:
sudo systemctl restart memcached

That’s it! Memcached is now installed and running on your Redhat/CentOS system. You can now configure your applications to use Memcached to improve their performance.

(https://rpdrlatino.com/)

Leave a Comment