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 installCompile 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 installIf you are unlucky, you might need this line instead
./configure --with-lib-event=/usr/local && make && make installThis next bit is only required because the CentOS/memcached is nasty, test it.
memcachedIf 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.confNow 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 memcachedThe 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:
- Simple install of memcached on Ubuntu
Memcached is a free, high performance distributed memory object caching system. In English, it can... - Installing mytop on cpanel
MyTop is one of the best MySQL monitoring tools available, written by a MySQL... - Installing mod_evasive on cPanel and/or Apache
This guide details how to install mod_evasive on cPanel to help protect against DDOS attacks,... - mod_geoip Revisted including stopping spam in phpBB 2
I've recently moved a client's forum onto a new cPanel server, previously it was on... - [Snippet] CentOS Server Firewall Configuration
CentOS 5 Server has a nice text interface to configuring your firewall. ...
What this article useful to you?
Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Geeky, Linux, cPanel/WHM category.