Heim  >  Artikel  >  php教程  >  php 安装redis扩展,phpredis扩展

php 安装redis扩展,phpredis扩展

WBOY
WBOYOriginal
2016-06-13 09:17:031319Durchsuche

php 安装redis扩展,phpredis扩展

 

大家可以去http://code.google.com/p/redis/downloads/list这个地址找最近的下载
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz
tar zxf redis-2.6.14.tar.gz && cd redis-2.6.14
make
make install
也可以不执行make install,可以自己建立redis管理目录,当然我喜欢让redis放在系统默认目录下.
cp redis.conf /etc/
vi /etc/redis.conf
daemonize no
daemonize yes
将no改为yes,让redis后台运行

获取php-redis扩展
wget -c http://pecl.php.net/get/redis-2.2.4.tgz
tar -zxvf redis-2.2.4.tgz
cd redis-2.2.4
/data/klj/php/bin/phpize
./configure --with-php-config=/data/klj/php/bin/php-config


编译失败缺少M4 autoconf
wget http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
tar -zxvf m4-1.4.17.tar.gz
cd m4-1.4.17
./configure
make
make install


wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure
make && make install
cd ../redis-2.2.4

/data/klj/php/bin/phpize
./configure --with-php-config=/data/klj/php/bin/php-config
make && make install

cd /data/klj/php/lib/php/extensions/no-debug-non-zts-20131226/
修改配置文件 加入
vim /data/klj/php/etc/php.ini

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn