centos7下yum安装memcache

1.安装memcache和依赖库

1
2
yum install libevent libevent-deve
yum install memcached

2.安装php扩展模块

1
2
3
yum -y install libmemcached
yum -y install php56w-pecl-memcache
php -m | grep memcache                //如果安安装正确,则会显示memcache的模块

3.php.ini内添加

1
2
3
vim /etc/php.ini
[memcache]
extension = memcache.so

添加评论