Memcached is general purpose, high performance memory caching system, which is used to speed up the dynamic websites. Basically, Memcached uses RAM to store the cached data in serialized key value format. Memcached is free and Open source software distributed under revised BSD licence.
Memcached is required when websites handles large number of data with large number of users. As the number of user increased, website’s speed get slow and then it is important to have some data into memory to handle the request.
#1 Install Memcached
Before Memcached installation, it is important to update apt-get package. However, not only memcached but if you are installing anything on Ubuntu it is best practice to update the package.
$ sudo apt-get update
Now, memcached installation is very easy using one command
$ sudo apt-get install memcached
The default port assigned to memcached is 11211. It can be changed if required. For example; if I need to change the default configuration, I need to update the settings in ‘/etc/memcached.conf’ file.
Now, save the config file and restart the memcached service.
$ sudo service memcached restart
Now memcached is running on the server. Please leave a comment if you guys face any problem.