# yum install memcachedFor CentOS/RHEL 7# systemctl enable memcached# systemctl start memcachedFor CentOS/RHEL 6/5# service memcached start# chkconfig memcached on# yum groupinstall "Development tools"# yum install zlib zlib-devel# yum install php php-devel php-pear# pecl install memcache# echo "extension=memcache.so" >> /etc/php.d/memcache.iniFor CentOS/RHEL 7# systemctl restart nginx# systemctl restart php-fpmFor CentOS/RHEL 6/5# service nginx restart# service php-fpm restart//创建phpinfo()文件 检查是否安装成功
以上代码注意版本,测试以上代码成功 环境contos6.5 LNMP
contos5/6/7 nginx php-fpm 安装 memcached
原文地址:http://www.cnblogs.com/phper8/p/8011265.html