Install, Configure And Verify Memcached in Ubuntu

Memcached is a high performance distributed memory object caching system and nowadays it’s kind of essential for Virtual Private Server (VPS) or dedicated server. In this tutorial I will show you How to Install Memcached In Ubuntu.

Memcached is a free and Open source distributed memory object caching System. Memcached used to speed up dynamic database driven website by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read. (Wikipedia). It reduces the request of MySQL query and improve loading speed of dynamic website which utilizes Database.

You know every millisecond counts in Website loading time and it impacts a lot in Website revenue, Visitor satisfaction and SEO. So it’s essential to have a memcached in your web-server to improve your website performance.

If you are using Shared hosting then there’s a very little chances to have Memcached Installed and configured for your website. You can contact your hosting provider for more info about their features and performance. And if you are using VPS then you have the chances to add one more improvement in speed optimization in your website by installing and configuring Memcached.

Here is the instruction of installing Memcached in Ubuntu 14.04 or later version. In next I will add more tutorial about Installing Memcached in various Linux distribution line CentOS, Red Hat etc.

How To Install Memcached In Ubuntu

In this tutorial I’ve used my Playground Server which is DigitalOcean’s $5 droplet with Ubuntu 14.04 LTS installed and Basic LAMP server setup with Apache2, PHP5 and MySQL installed. I assume you have LAMP stack installed and if you need instruction of Basic LAMP stack installation, Head over to our LAMP installation Tutorial in Ubuntu.

Once everything is in it’s place or you are already in production mode, Install Memcahed and memcached extention for PHP5 using the commands below:

sudo apt-get install memcached php5-memcached

Note That: There are two php extension available. one is memcache while another is memcached. We will install memcached extension which is stable, feature rich and faster than memcache.