Easy way to instale Memcache on WHM and configure it?


Well-known member
I would like to know which is the best way to install memcache on a CentOS server with WHM installed.

I know that I have to configure config.php file on xenforo folder, but which are the best parameters to set in the memcache configuration file?

Digital Doctor

Well-known member
Popular topic.


This one seems good.

Solution is simple, build memcache and include it in php.ini. Let see, how we do it.
Step 1 – Download memcache
mkdir repo
cd repo
wget http://pecl.php.net/get/memcache-3.0.6.tgz
tar -xvfz memcache-3.0.6.tgz
Step 2 – Compilation & installation
cd memcache-3.0.6
you should see something like this;
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
make install
Step 3 – Load in php.ini
Enable memcache in php.ini.
echo "extension=memcache.so" >> /usr/local/lib/php.ini
service httpd restart


Well-known member
I get this error:

root@fhc [~/repo]# wget http://pecl.php.net/get/memcache-3.0.6.tgz
--2012-08-08 16:40:12-- http://pecl.php.net/get/memcache-3.0.6.tgz
Resolving pecl.php.net...
Connecting to pecl.php.net||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54717 (53K) [application/octet-stream]
Saving to: âmemcache-3.0.6.tgz.1â

100%[======================================>] 54,717 323K/s in 0.2s

2012-08-08 16:40:12 (323 KB/s) - âmemcache-3.0.6.tgz.1â

root@fhc [~/repo]# tar -xvfz memcache-3.0.6.tgz
tar: z: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now


XenForo moderator
Staff member
On Centos?

yum install memcached.x86_64 php-pecl-memcache.x86_64

Banana Pup

Well-known member
On Centos?

yum install memcached.x86_64 php-pecl-memcache.x86_64
Be sure after you do to enable it in WHM too. Software ->> Module Installer ->> PHP Pecl and search memcache. You should get two results, memcache and memcached, install both then restart Apache.