Memcache PHP7.0安装

安装memcache扩展

1 yum search memcache

2 yum -y install –enablerepo=rpmforge memcached

3 本地下载php7 memcache扩展 https://github.com/websupport-sk/pecl-memcache/archive/php7.zip

并上传至服务器

4 yum install zip unzip  安装解压软件

5  yum install gcc gcc-c++ autoconf automake

6  yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel (安装依赖zlib、openssl和pcre)

7 unzip pecl-memcache-php7.zip

cd pecl-memcache-php7

9 /usr/bin/phpize

10 ./configure --with-php-config=/usr/bin/php-config

11 make && make install

12 cd /

13 cd etc

14 vi php.ini

15 最后加上

[memcache]

extension_dir = "/usr/lib64/php/modules/"(这个路径是

make && make install出来的)

extension = "memcache.so"


开启memcache

memcached -d -m 128 -l 127.0.0.1 -p 11211 -u root


http://www.cnblogs.com/hejun695/p/5369610.html


安装telnet以连接memcache

yum list telnet* 查看telnet相关的安装包 

yum install telnet-server 安装telnet服务 

yum install telnet.* 安装telnet客户端

telnet 127.0.0.1 11211


博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论