kieranbarnes these are the things i learnt today

Installing memcached on CentOS (cPanel)

Posted on January 23, 2010

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!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Simple install of memcached on Ubuntu
    Memcached is a free, high performance distributed memory object caching system. In English, it can...
  2. Installing mytop on cpanel
    MyTop is one of the best MySQL monitoring tools available, written by a MySQL...
  3. Installing mod_evasive on cPanel and/or Apache
    This guide details how to install mod_evasive on cPanel to help protect against DDOS attacks,...
  4. 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...
  5. [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.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.