How to install memcached in WHM/Cpanel VPS version 1

Today, I will make a tutorial for installing memcached in a WHM/Cpanel Centos VPS.

1. Upgrade your CentOS installations :

# yum update && yum upgrade

2. Let’s install the libevent and another required modules :

# yum install libevent libevent-devel gcc make -y
# wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
# tar xvf memcached-1.4.5.tar.gz
# cd memcached-1.4.5
# ./configure && make && make install

3. Testing the installation of the memcached and memcache from the WHM/Cpanel :

WHM/Cpanel  >> Softwares >> Module Installer >>PHP Pecl >> Manage
Search for memcache, at the “Find a PHP PECL” search box, and install them both

If you have some installation problem like this :

The memcached.so object is not in /usr/local/lib/php/extensions/no-debug-zts-20090626

Then you have to Login again to the shell, and :

# cd /usr/local/lib/php/extensions/no-debug-zts-20090626
# ln -s /usr/local/lib/php/extensions/no-debug-zts-20090626/memcache.so
# chmod 0755 /usr/local/lib/php/extensions/no-debug-zts-20090626
# /scripts/restartsrv_apache
Or if you are running Nginx Admin, you can restart the httpd service from it.

If this all finished, try to run your WordPress Memcached plugin or your SMF Caching

Leave a Reply

Your email address will not be published. Required fields are marked *