Install memcached on CentOS 5 and 6

Speed check using hping3 when ICMP packets are disabled

Install memcached on CentOS 5 and 6

Yesterday I had to install memcached on a VPS server for a client which, what he said, was especially needed for his application. For those who don’t know, memcached is a high performance distributed memory object caching system, like its name, it is using your ram memory, speeding up dinamic web applications by reducing the database workload.

I will try to explain for both CentOS 5 and 6 here, so follow the steps carefully.

  • Installing memcached on your server first

For CentOS 5.X i386 / i686 please import and install the follow yum repo:

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

For CentOS 5.X x86_64 please import and install the follow yum repo:

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

For CentOS 6.X i386 / i686 please import and install the follow yum repo:

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

For CentOS 6.X x86_64 please import and install the follow yum repo:

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Then install memcached using yum:

yum install memcached

The settings for this software can be found here /etc/sysconfig/memcached

PORT="11211"
USER="nobody"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""

After making changes to this file save it and you’re done.

Then you just need start the service running:

/etc/init.d/memcached start

And that is all, you now need to install php memcached extension which will be another article now.

Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to www.yourhowto.net with appropriate and specific direction to the original content.