PHP extension needs to go to a dedicated web site to find the expansion pack, this site is http://pecl.php.net/this is a PHP extension package site, you can find PHP on this site on memcached extension package, search memcached later, I downloaded memcached-2.2.0.tgz, and then we formally entered the process of installing the memcached extension (as if we had said a lot of nonsense ...). Anyway, no one has read my blog.
Download libmemcached First:
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
Unpacking: TAR-ZXF libmemcached-1.0.18.tar.gz
Enter the unpacked package and compile the installation:
./configure--prefix=/usr/local/libmemcached--with-memcached//Note:--with-memcached This option must be added
Make && make install
After the installation is complete, start installing the Memcached module:
wget http://pecl.php.net/get/memcached-2.2.0.tgz
Unpacking: TAR-ZXF memcached-2.2.0.tgz
Enter the directory after unpacking, first use the phpize command to generate a configure file
Phpize///Here you need to explain, this command is compiled to install PHP in the installation directory under the Bin directory, but in the Yum installation of PHP need to install a package called Php-devel will have (I have been a pit here ...) )
./configure--with-php-config=/usr/bin/php-config--with-libmemcached-dir=/usr/local/libmemcached
Php-config here if you don't know where it is, you can find it with the Find/-name php-config command.
Make && make install
After the installation is complete, you need to add a extension=memcached.so record in the php.ini file, and then use the PHP-M command to see the memcached module.
Installing the memcached Extension