首页 > 技术文章 > centos5/6/7 nginx php-fpm 安装 memcached

phper8 2017-12-09 13:23 原文

# yum install memcached

For CentOS/RHEL 7
# systemctl enable memcached
# systemctl start memcached

For 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.ini

For CentOS/RHEL 7
# systemctl restart nginx
# systemctl restart php-fpm

For CentOS/RHEL 6/5
# service nginx restart
# service php-fpm restart

//创建phpinfo()文件 检查是否安装成功

以上代码注意版本,测试以上代码成功 环境contos6.5 LNMP

推荐阅读