How to install Memcache with LAMP on Ubuntu 12.04

php-memcache-logoMemcache is a application which helps to speed up servers by caching their information. Through this program we can cache the recent queried data for certain time period with allocated specific memory. Whenever we required the data again memcache serves it from cache, instead of generating the result form database.

Installing Lamp and PHP5 modules for Memcache:

Before installing we will update the system and will install build-essential

Now we will install Memcache:

Now we will use PECL to install memcache:

After completion of the installation we will add memcached to memcache.ini

Validate memcache by issuing the below commands:

Output:

Also we can test by issuing below command

Output

That’s it now we are ready to use memcache. Good luck!!

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply