首页 > 系统 > Linux > 正文

CentOS安装memcached的php扩展

2024-08-28 00:23:31
字体:
来源:转载
供稿:网友

php扩展memcache的作用是为了支持memcached数据库缓存服务器,下面是安装方法。

1、下载并解压memcache文件
wget -c http://pecl.php.net/get/memcache-3.0.6.tgz
tar xzvf memcache-3.0.6.tgz
cd memcache-3.0.6

2、执行phpize扩展安装程序,假设phpzie的路径为/usr/local/php/bin/phpize,具体的路径得根据自己的环境修改。
/usr/local/php/bin/phpize

3、开始安装扩展memcache
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make && make install

4、最后修改php.ini文件,在zend之前加入如下代码。
[memcache]
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension=memcache.so

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表