memcacheCompiling in PHP
# wget Http://www.lishiming.net/data/attachment/forum/memcache-2.2.3.tgz
# tar ZXVF memcache-2.2.3.tgz
# CD memcache-2.2.3
#/usr/local/php/bin/phpize
#./configure--with-php-config=/usr/local/php/bin/php-config
# make
# make Install
# CP modules/memcache.so/usr/local/php/ext///copy memcache.so to PHP extension_dir, #查看php Extension_dir method is/usr/local /php/bin/php-i |grep Extension_dir
Modify the extension path and modify it in php.ini:
Extension_dir = "/usr/local/php/ext"
Then add the php.ini in the
Extension = memcache.so
After saving, you can use/USR/LOCAL/PHP/BIN/PHP-M to detect and view specific parameters.
memcached Compilation and Installation
wget http://syslab.comsenz.com/downloads/linux/memcached-1.4.5.tar.gz
Tar zxvf memcached-1.2.8.tar.gz
CD memcached-1.2.8
./configure--prefix=/usr/local/memcached
Make && make install
Start:
/usr/local/memcached/bin/memcached-m 2048-p 11211-l 127.0.0.1-d-U www
-m behind specifies how much memory memecached uses, in units of M
-P Specify memcached boot port
-l Specifies the IP of the binding
-u Specifies to start as an account
The application of memcache and memcached in PHP