First must complete the necessary software installation, memcached is PHP connection memcached server PHP extension its name is called memcached
There used to be an extension of the PHP connection memcached server called Memcache, whose name is Memcache
PHP memcache and memcached extensions are used as clients to connect to the memcached server
But memcached is more powerful than memcache performance as a client, and Memcache has stopped updating, so use the extension now
Memcached
Next install the necessary components: wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
Mkdir/usr/local/libmemcached
Tar XF libmemcached-1.0.18.tar.gz CD libmemcached-1.0.18
./configure--prefix=/usr/local/libmemcached--with-memcached
Make && make install
wget http://pecl.php.net/get/memcached-2.2.0.tgz
Tar XF memcached-2.2.0.tgz CD memcached-2.2.0
/usr/local/php/bin/phpize (Generate Configure file)
./configure--with-php-config=/usr/local/php/bin/php-config--with-libmemcached-dir=/usr/local/libmemcached--
Enable-memcached
Make && make install
echo "extension=memcached.so" >>/etc/phpini
Service PHP-FPM Restart
PHP supports the use of memcached here to complete
Installing memcached Extensions for PHP