php安装memcache、redis扩展模块
关于编译安装php的选项可以为1
./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-iconv --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-libxml-dir=/usr/ --enable-xml --enable-sockets --enable-fpm --with-config-file-path=/etc/ --with-config-file-scan-dir=/etc/php.d --with-bz2 --with-curl --with-mhash --with-mcrypt --enable-intl --with-gd --enable-gd-native-ttf --enable-shmop
需要安装memcache需要编译libmemcache
libmemcached的下载地址为https://launchpad.net/libmemcached
编译安装
1
2
3
4
5
wget
tar xf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18.tar.gz
./configure
make && make install
扩展memcache模块
memcached的模块地址为http://pecl.php.net/package/memcache
编译安装
1
<a href="http://pecl.php.net/get/memcache-3.0.8.tgz" target="_blank">http://pecl.php.net/get/memcache-3.0.8.tgz</a>
1
2
3
4
5
tar xf memcache-3.0.8.tgz
cd memcache-3.0.8
进入解压以后的目录,是没有configure文件的,需要执行 /usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
编辑php.ini文件,在里面添加以下行
1
extension=memcache.so
redis的模块添加与memcached的一样
redis的下载地址为http://pecl.php.net/package/redis
编译完成后同样需要添加extesion文件
本文以及验证通过,此处不在给出验证结果
页:
[1]