-
Step 1: Login into your WHM panel and using
easyapache
enableMemcache
-
Step 2: SSH into your server and fire this command
yum install memcached.x86_64 php-pecl-memcache.x86_64
-
Step 3: Go to
Software -> Module Installers -> PHP Pecl
, Search formemcache
and then install bothmemcache
&memcached
-
Step 4: Restart apache once, Fire:
service httpd restart
-
Step 5: Start memcache by firing this command:
memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody
(d = daemon, m = memory, u = user, l = IP to listen to, p = port) -
Step 6: Check your memcached server is running successfully:
If you are unable to install "memcached", do the following:ps -eaf | grep memcached
-
Download the latest source from http://libmemcached.org/libMemcached.html
# wget https://launchpad.net/libmemcached/1.0/1.0.17/+download/libmemcached-1.0.17.tar.gz # tar xvf libmemcached-1.0.17.tar.gz # cd libmemcached-1.0.17 # ./configure # make & make install
Start the memcached as daemon process and ensure memcached is automatically started after each server reboot.
# memcached -d -u nobody -m 1048 -p 11211 127.0.0.1
# vim /etc/rc.d/rc.local // add this line memcached -d -u nobody -m 1048 -p 11211 127.0.0.1
Add the following codes into php.ini
# vi /usr/local/lib/php.ini // add this line extension=memcache.so
- 2 Utenti hanno trovato utile questa risposta