Memcache Installation in Ubuntu

Memcache Installation in Ubuntu

This article explains about installation of Memcache in Ubuntu systems.

Memcache installation in Ubuntu is required to use chache mechanism in the applications developed using php. Many frames woks and CMS developed using php can use the advantages of Memcache.

Below are the steps used to follow for Memcahe installation in ubuntu system.

Ensure that we will be downloading the latest packages to our server:

sudo apt-get update

Install memcached:

sudo apt-get install memcached php5-memcache


Install php-pear which is the repository which stores memcache:

sudo apt-get install php-pear


Unless you already have a compiler on your server,  download build-essential:

sudo apt-get install build-essential


Use PECL  to install memcache:

sudo pecl install memcache

Respond “yes” if asked whether you would like to enable memcache session handler support.
Finally, add memcache to php.ini

sudo echo “extension=memcache.so” > sudo /etc/php5/apache2/php.ini

checkk it terminal by typing command
–>telnet localhost 11211
add extension in php.ini
–>extension=php_memcache.dll
restart apache
–> sudo /etc/init.d/apache2 start
check in phpinfo.php file memcache enabled

Leave a Reply

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