installing memcache modules for PHP extensions under Linux
2011-09-05 13:31:00| Category: Linux| Report | Font size Subscription
sh# wget http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz
sh# wget http://www.monkey.org/~provos/libevent-1.4.6-stable.tar.gz
sh# wget http://pecl.php.net/get/memcache-3.0.1.tgz
sh# TAR-ZXVF libevent-1.4.6-stable.tar.gz
sh# CD libevent-1.4.6-stable
sh#./configure-prefix=/usr/local/libevent
sh# make
sh# make Install
sh# CD. /
sh# TAR-ZXVF memcached-1.2.6.tar.gz
sh# CD memcached-1.2.6
sh#./configure--prefix=/usr/local/memcache--with-libevent=/usr/local/libevent
sh# make
sh# make Install
Installing PHP's Memcache extension
1 You can use the PECL installer that comes with PHP
#/usr/local/servers/php5/bin/pecl Install Memcache
2 sh# CD. /
sh# TAR-ZXVF memcache-3.0.1.tgz
sh# CD memcache-3.0.1
sh#/usr/local/bin/phpize (first to perform this, the path is obtained by: sh# which phpize)
sh#./configure-enable-memcache-with-php-config=/usr/local/bin/php-config-with-zlib-dir (Path by: sh# which php-config Gets
sh# make
sh# make install (Hint: Installing shared extensions:/USR/LOCAL/LIB/PHP/EXTENSIONS/NO-DEBUG-NON-ZTS-20060613/is successful)
After installation, there will be a hint like this:
Installing Shared extensions:/usr/local/servers/php5/lib/php/extensions/no-debug-non-zts-20060922/
Keep this in mind and then modify the php.ini to put
Extension_dir = "./"
Revision changed to
Extension_dir = "/usr/local/servers/php5/lib/php/extensions/"
and add a row
extension= "No-debug-non-zts-20060922/memcache.so"
Memcache Monitor: http://livebookmark.net/journal/'s memcache.php
Memcache start: sh#/usr/local/memcached/bin/memcached-u root-d-M 200-l 10.2.0.88-p 11211