centos安装php-memcached
今天同事给我说了,我才知道原来还有php-memcached,我一直以为只有memcached和php-memcache,好了,现在来给大家说下怎么安装php-memcached.
系统:centos 5.5
需要的软件包:libmemcached-1.0.15.tar.gz
memcached-2.1.0.tgz
1.安装前准备
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
wget http://pecl.php.net/get/memcached-2.1.0.tgz
2.安装libmemcached
tar zxf libmemcached-1.0.15.tar.gz && cd libmemcached-1.0.15
./configure --prefix=/usr/local/libmemcached --with-memcached
make && make install
3.安装php-memcached
tar zxf memcached-2.1.0.tgz && cd memcached-2.1.0
/usr/local/php/bin/phpize
./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
make && make install
vi /etc/php.d/memcached.ini
extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcached.so"
4.验证
php -m|grep memcached
memcached
最后重启apache.
好了,php-memcached就可以算是安装成功了.
系统:centos 5.5
需要的软件包:libmemcached-1.0.15.tar.gz
memcached-2.1.0.tgz
1.安装前准备
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
wget http://pecl.php.net/get/memcached-2.1.0.tgz
2.安装libmemcached
tar zxf libmemcached-1.0.15.tar.gz && cd libmemcached-1.0.15
./configure --prefix=/usr/local/libmemcached --with-memcached
make && make install
3.安装php-memcached
tar zxf memcached-2.1.0.tgz && cd memcached-2.1.0
/usr/local/php/bin/phpize
./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
make && make install
vi /etc/php.d/memcached.ini
extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcached.so"
4.验证
php -m|grep memcached
memcached
最后重启apache.
好了,php-memcached就可以算是安装成功了.
评论: