Installing memcached in Plesk

Install libevent:

cd /usr/local/src
wget http://monkey.org/~provos/libevent-1.3e.tar.gz
tar -zxf libevent-1.3e.tar.gz
cd libevent-1.3e
./configure
make
make install

you may need to link /usr/local/lib/libevent to /usr/lib/libevent

wget http://danga.com/memcached/dist/memcached-1.2.4.tar.gz
tar zxvf memcached-1.2.4.tar.gz
cd memcached-1.2.4
./configure
make
make install

which memcached
/usr/local/bin/memcached -d
memcached -d -m 256 -u nobody -p 11211 -l 192.x.x.x (Server IP)

Enabling it in PHP

check zlib is installed in the server.

cd /usr/src
wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure
make
make install

==========================================

php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

vi /usr/local/lib/php.ini

extension = “memcache.so”

save the file and restart httpd server.

/etc/init.d/httpd restart

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: