In this tutorial we will show you how to install Memcached on CentOS 8. For those of you who didn’t know, Memcached is a system daemon that allows you to cache information on RAM memory, this allows you better app speeds and avoid bad performance on your dedicated or vps server. It is very useful for optimizing dynamic websites and enabled speed by caching objects in memory.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Memcached on a CentOS 8 server.
Install Memcached on CentOS 8
Step 1. First let’s start by ensuring your system is up-to-date.
Step 2. Installing Memcached on CentOS 8.
Memcached packages are included in the default CentOS 8 repositories. Execute the following commands to install memcached:
Once the installation is completed, enable and start the Memcached service using following command:
Memcached configuration file is located in
/etc/sysconfig/memcached. You can edit this file to set start options for Memcached service:
Save the file and restart the Memcached service for the changes to take effect:
CentOS comes with a firewall configuration tool FirewallD, you’ll need to open the port on the firewall:
You can install PHP Memcached extension by typing:
Congratulation’s! You have successfully installed Memcached. Thanks for using this tutorial for installing Memcached on CentOS 8 systems. For additional help or useful information, we recommend you to check the official Memcached website.