This article describes how to install the memcached client of php in linux. For more information about how to install the memcached client of php, see the following.
1. download and install the libmemcached client
Address: http://libmemcached.org/libMemcached.html
$ Wget-c https://launchpad.net/libmemcached/1.0/1.0.16/javasdownload/libmemcached-1.0.16.tar.gz?do not download 1.0.17 Oh bug $ tar-zxvf libmemcached-1.0.16.tar.gz $ cd libmemcached-1.0.16 $. /configure -- prefix =/usr/local/libmemcached -- with-memcached $ sudo make install
2. download and install memcached
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: for how to compile a restart nginx and php script, refer
Php startup script
Nginx startup script
4. check whether the installation is successful.
If the phpinfo () function appears as follows, the installation is successful.