php扩展memached安装

memcached依赖于libevent,首先安装libevent

官方网站 http://libevent.org/

./configure –prefix=/usr/local/libevent

make && make install

memcached安装

官网http://pecl.php.net/package/memcache

  wget  http://www.danga.com/memcached/dist/memcached-1.0.4.tar.gz

 tar  -zxvf    memcached-1.0.4.tar.gz

Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

进入php源码包目录:cd /usr/local/php-5.6.25/ext/openssl

执行命令:  cp ./config0.m4 ./config.m4 即可

[root@weidaijie openssl]# /usr/local/php-fpm/bin/phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212

./configure --with-php-config=/usr/local/php-fpm/bin/php-config --enable-memcache
make &&make install
上述安装完后会有类似这样的提示:
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/
把php.ini中的extension_dir = “./”修改为

extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/”

添加一行来载入memcache扩展:extension=memcache.so
/usr/local/php-fpm/bin/php -m检测有没有memcache模块
service php-fpm restart
service nginx restart

 

 

转载于:https://www.cnblogs.com/weidaijie/p/9603661.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值