1, because php_memcached is dependent on libmemcached library, so first install libmemcached library, need to install libmemcached-1.x above version
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
TAR-ZXVF libmemcached-1.0.16.tar.gz
CD libmemcached-1.0.16
./configure-prefix=/usr/local/libmemcached
Make && make install
2. Install the extension, here we use PHP's own pecl command to install the PHP extension.
/usr/local/webserver/php/bin/pecl Install memcached
Warning:channel "Pecl.php.net" have updated its protocols with "Pecl channel-update pecl.php.net" to update
Downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
........... done:70,449 bytes
source files, Building
Running:phpize
Configuring for:
PHP Api version:20121113
Zend Module Api no:20121212
Zend Extension Api no:220121212
libmemcached directory [No]: /usr/local/libmemcached
Building in/tmp/pear/temp/pear-build-rootjtskod/memcached-2.2.0
Running:/tmp/pear/temp/memcached/configure--with-libmemcached-dir=/usr/local/libmemcached
...............................
...............................
3, after the installation is complete in the configuration file add
Vim/usr/local/webserver/php/etc/php.ini
Extension=memcached.so
4. Restart the Web server
Service Nginx Restart
5. Restart PHP
Service PHP-FPM Restart
6. Verification
Php-m|grep Memcache
Memcache
Memcached
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/88/42/wKiom1fsvNnAmf4BAAEkp8to68c802.png-wh_500x0-wm_3 -wmp_4-s_1355174933.png "title=" Image.png "alt=" Wkiom1fsvnnamf4baaekp8to68c802.png-wh_50 "/>
This article is from the "IT" blog, so be sure to keep this source http://wang3781.blog.51cto.com/9428009/1857757
How to install PHP memcache extensions