1,进入php扩展官网 http://pecl.php.net/ 搜索memcache,选择对应扩展复制其地址 (安装memcache-2.2.7 http://pecl.php.net/get/memcache-2.2.7.tgz)
2,
cd /usr/local/src
wget http://pecl.php.net/get/memcache-2.2.7.tgz
tar -zxvf memcache-2.2.7.tgz
cd memcache-2.2.7
/usr/local/php/bin/phpize --with-php-config=/usr/local/bin/php-config #使用phpize生成memcache的configure文件
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
vi /usr/local/php/lib/php.ini #修改php.ini文件引入memcache扩展(php.ini添加了
/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/memcache.so
)
/usr/local/httpd/bin/apachectl restart #重启apache
网友评论