My notes here for future because it took 2 hours to get working on WHM/Centos while vanilla Ubuntu too 2 minutes….

Update: There is now a much easier way. Since writing this article, Memcached has become available in WHM via EasyApache4. 

yum install memcached
yum install libevent-devel
#Download new libmemcached (cpanel Centos has 0.3xxx I got 1.0x
#https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
./configure
make
make install
pecl install memcached #will now succeed
#add to end of /usr/local/lib/php.ini :
extension=memcached.so
#To avoid Chkserv alerts though I found chkserv still wouldn't start memcached if it stopped
#Add memcached to /etc/chkserv.d/chkservd.conf and create a file for it in /etc/chkserv.d
echo "memcached: 1" >> /etc/chkserv.d/chkservd.conf
echo "service [memcached] = x, x, x, / etc / init / restart memcached, memcached, memcached"> /etc/chkserv.d/memcached

#To avoid csf/lfd alerts of a suspicious process running, add the following to /etc/csf/csf.pignore

/usr/bin/memcached

Leave a Reply

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