How To Install Memcached On Ubuntu 12.04 LTS

Memcached is a system that works to speed up virtual private servers by caching server information. It is a high-performance distributed memory object caching that caches objects for faster website performance. The program functions somewhat like short term memory for your applications. Memcached runs on Unix, Linux, Mac OS X, Ubuntu, PHP and Windows. Installation of memcached on Ubuntu 12.04.is very simple. You can see how to install Memcache on Ubuntu 12.04.

Step 1 : To make sure that all of the packages we download to the VPS are up to date. Use the following command.

SUDO APT-GET UPDATE

Step 2 : You should have MySQL and PHP installed on the virtual server.

SUDO APT-GET INSTALL MYSQL-SERVER PHP5-MYSQL PHP5 PHP5-MEMCACHE

To Install Memcache on Ubuntu 12.04

Step 1 : To install memcached via apt-get by using following command.

SUDO APT-GET INSTALL MEMCACHED

Step 2 : To install php-pear, the repository that stores memcache by using following command.

SUDO APT-GET INSTALL PHP-PEAR

Step 3 : To use PECL (PHP Extension Community Library) to install memcached by using following command.

SUDO PECL INSTALL MEMCACHE

Step 4 : Click to Enable memcache session handler support? [yes].

You have completed the installation of memcache with PECL on the VPS

Add memcached to memcache.ini by using following command.

ECHO “EXTENSION=MEMCACHE.SO” | SUDO TEE /ETC/PHP5/CONF.D/MEMCACHE.INI

You can start to using Memcache.

Add a Comment

Your email address will not be published. Required fields are marked *