linux平台memcache扩展的安装
1,安装php
[root@Dell-DB virtual]# rpm -qf /usr/bin/phpize
php-devel-5.1.6-27.el5
[root@Dell-DB virtual]# yum list|grep php
php.x86_64 5.1.6-27.el5 installed
php-cli.x86_64 5.1.6-27.el5 installed
php-common.x86_64 5.1.6-27.el5 installed
php-devel.x86_64 5.1.6-27.el5 installed
2,安装memcache扩展插
wget
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5/
/usr/bin/phpize
./configure --enable-memcache=/usr/local/servers/memcached
make
make install
cd ../
修改php.ini文件
[root@Dell-DB virtual]# find / -name memcache.so
/usr/lib64/php/modules/memcache.so
[root@Dell-DB virtual]# find / -name php.ini
/etc/php.ini
修改php.ini配置如下:
extension_dir = "/usr/lib64/php/modules"
extension = "memcache.so"
并在此行后增加一行,然后保存:
创建php文件test.php,内容如下:
phpinfo();
?>
阅读(2258) | 评论(0) | 转发(0) |