How to Install the Memcached Module on Ubuntu 12.04 LTS

Josh Sherman
1 min read
Servers / Serverless PHP Debian / Ubuntu NoSQL
WARNING: The following post talks about an Ubuntu version that is at end of life. It's highly recommended that you upgrade your server to a newer Ubuntu version.

Installing the Memcached module for PHP on Ubuntu 12.04 LTS is as simple as can be. First let’s make sure we have Memcached installed:

sudo apt-get install memcached

On Ubuntu, the process to install the PHP module is similar to how we installed Memcached itself:

sudo apt-get install php5-memcache php5-memcached

If you’re using PHP as an Apache module you will need to restart Apache and you are using PHP with a FastCGI Process Manager you will need to restart said manager. Once restarted, pull up phpinfo() and you should see some new sections labeled memcache and memcached.

Why would we need both modules? Technically, you don’t, you only need to use the one that you would like to utilize. Both modules support overlapping features of Memcached and each have their own caveats and advantages which I will save for a future post.

Join the Conversation

Good stuff? Want more?

Weekly emails about technology, development, and sometimes sauerkraut.

100% Fresh, Grade A Content, Never Spam.

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.

Currently Reading

Parasie Eve

Previous Reads

Buy Me a Coffee Become a Sponsor

Related Articles