Installing memcached on CentOS (cPanel)
Welcome to hell. No really, compared to installing memcached on Ubuntu, CentOSs really sucks. CentOS really sucks for package management. Really sucks. Anyway, on to the point.
Here's how I installed memcached on CentOS, which I mainly use for cPanel.
LibEvent
Memcache requires LibEvent. Go to their site and get the latest version.
- wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
- tar xvfz libevent-1.4.13-stable.tar.gz
- cd libevent-1.4.13-stable
- ./configure && make && make install
Compile and Install Memcache
Now you can install Memcache. Again you should check their site for the latest version.
- wget http://www.danga.com/memcached/dist/memcached-1.4.4.tar.gz
- tar xvfz memcached-1.4.4.tar.gz
- cd memcached-1.4.4
- ./configure && make && make install
If you are unlucky, you might need this line instead
- ./configure --with-lib-event=/usr/local && make && make install
This next bit is only required because the CentOS/memcached is nasty, test it.
- memcached
If it works, great! Skip this next bit.
If it doesn't work and throws an error about shared libraries and such, you might need to do this
- echo /usr/local/lib/ >> /etc/ld.so.conf.d/libevent-i386.conf
Now we need to make it start on bootup.
- cp scripts/memcached.sysv /etc/init.d/memcached
- chmod 755 /etc/init.d/memcached
- mkdir /var/run/memcached
- chkconfig memcached on
- chkconfig --list | grep memcached
The last line should return "on" values for 0,2,3,4,5
Now you want to install the PHP extension for memcached? Har har. GLWT!
Related posts
- Installing memcached on CentOS/cPanel
memcached a (distributed) memory object caching system vital if your running a HA Linux* setup... - Simple install of memcached on Ubuntu
Memcached is a free, high performance distributed memory object caching system. In English, it can... - Installing nginx & PHP-FPM securely on CentOS
I won't go into the reasons why you should install nginx, if you're here, you've... - Installing mytop on cpanel
MyTop is one of the best MySQL monitoring tools available, written by a MySQL guru,... - Installing RepoForge (RPMForge) in CentOS
RepoForge (RPMForge) contains over 5,000 extra packages for CentO. Many new packages and some updated...




July 18th, 2011 - 16:44
This is what you needed to do. “Yum install cached”
Done.
July 18th, 2011 - 16:45
Make that “yum install memcached” no need at all to try and compile for source, and it will load the prerequisites. Just did it.