1. Installing SASL
Yum Install Cyrus-sasl-lib.x86_64yum Install cyrus-sasl-devel.x86_64
2. Download libmemcached
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
3, compiling and installing
Tar zxvf libmemcached-1.0.16.tar.gzcd libmemcached-1.0.16./configure--prefix=/usr/local/libmemcached-- Enable-saslmakemake Install
4. Installing memcached Installation
wget Http://pecl.php.net/get/memcached-2.1.0.tgztar zxvf MEMCACHED-2.1.0.TGZCD memcached-2.1.0
Get <pre name= "code" class= "python" >php-config directory Whereis <span style= "font-family:arial, Helvetica, Sans-serif ;" >php-config</span>
Phpize./configure--with-php-config=php-config Catalogue--with-libmemcached-dir=/usr/local/libmemcached/-- Enable-memcached-sasl
Make
Make install
5. Modify the corresponding configuration
Increase
Vi/etc/php.d/memcache.ini (previously installed memcache) or directly in the php.ini file
EXTENSION=MEMCACHED.SOMEMCACHED.USE_SASL = 1
Finally restart the Web server nginx or Apache
CentOS PHP installation memcached extension support SASL