Ubuntu – Install Memcached with PHP-FPM and Nginx

Previous: Ubuntu – Install APC with PHP-FPM and Nginx

Memcached is a distributed memory caching system and it caches data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Like APC, the installation is simple.

1. Install Memcached.

  • apt-get install memcached

 

2. After the installation, you could start and stop the servers by the following commands.

  • /etc/init.d/memcached start
  • /etc/init.d/memcached stop

 

3. Install Memcached PHP module.

  • apt-get install php5-memcached

 

4. Restart PHP-FPM

  • /etc/init.d/php5-fpm restart

 

5. Check it out.
php-memcached
 

6. You could configure Memcached @ /etc/php5/conf.d/memcached.ini.

Done =)

Reference: Life in apps, os’s and code! – Installing APC and Memcached on Ubuntu 12.04 with nginx

Advertisement

2 thoughts on “Ubuntu – Install Memcached with PHP-FPM and Nginx”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.