Professional Documents
Culture Documents
Installing MEMCACHED in Ubuntu & RHEL CentOS
Installing MEMCACHED in Ubuntu & RHEL CentOS
Installing MEMCACHED in Ubuntu & RHEL CentOS
com
Installing MEMCACHED in
Ubuntu & RHEL/CentOS
Originally published on
LinuxTechLab.com
Memcached is a very popular, open source distributed memory caching system, that is
used for temporarily storing information that is most likely to be used by a databse. It is
primarily used to boost the speed of websites that uses heavy databases, but its use are
not limited with database only, memcaahed can be used with other object types as well.
Memcached does not write any data to disk & as it runs in the memory to run, it is very
fast.
Memcacahed can be used with various web servers like apache, nginx etc, also many
programming languages like PHP, Python, Ruby have memcached libraries. In this
tutorial, we are going to learn to install memcached on RHEL & CentOS machines.
Pre-Requisites
Memcached packages are not available in the default RHEL/CentOS repositories & we
need to enable EPEL repository to install it. To enable the EPEL repository, run the below
mentioned commands (corresponding to the operating system being used)
RHEL/CentOS 7
$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-
10.noarch.rpm
Installation on CentOS/RHEL
Once the EPEL repository has been enabled, we can install memcached & its requred
dependencies using yum,
$ yum install memcached php-memcached
Thats it, this will install memcached on the system. We now need to start its service &
enable it for the boot time,
$ systemctl start memcached
$ systemctl enable memcached
Installation on Ubuntu
For Ubuntu machines, we need not add any extra repositories & can install memcached
by running,
$ sudo apt-get install memcached php-memcached
Once the package has been installed we will restart the apache server (as memcached
comes pre-configured) to implement the changes.
Configuration
To see all the information regarding the memcached using the follwoing command,
$ memcached -h
If we need to change or modify the default settings for Memcached, we can do that
using its configuration file.
After making changes to the file, be sure to restart the service to implement the
changes.
If you think we have helped you or just want to support us, please consider these :-
Connect to us: Facebook | Twitter | Google Plus
LinuxTechLab.com