The memcached client installation steps for installing PHP are described below
1. Download and install libmemcached client
Website address: http://libmemcached.org/libMemcached.html
$wget-C https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
#亲 don't download 1.0.17 OH There are bugs
$tar-zxvf libmemcached-1.0.16.tar.gz
$cd libmemcached-1.0.16
$./configure--prefix=/usr/local/ libmemcached--with-memcached
$sudo make
$sudo make install
2. Download and install memcached
Website address: http://pecl.php.net/package/memcached
$wget-C http://pecl.php.net/get/memcached-2.2.0b1.tgz
$tar-zxvf memcached-2.2.0b1.tgz
$CD MEMCACHED-2.2.0B1
$sudo/usr/local/php/bin/phpize
$./configure--enable-memcached--with-php-config=/ Usr/local/php/bin/php-config--with-libmemcached-dir=/usr/local/libmemcached--DISABLED-MEMCACHED-SASL
$ sudo make
$sudo make install
3, restart PHP nginx
$sudo/etc/init.d/nginx Restart
$sudo/etc/init.d/php restart
Note: How to write a restart Nginx and PHP script reference
PHP startup script
Nginx Startup script
4. Check if the installation is successful
The Phpinfo () function, if it appears as follows, indicates a successful installation