phpredis 装配

WBOY
Release: 2016-06-13 12:28:01
Original
1015 people have browsed it

phpredis 安装

phpredis是个人觉得最好的一个php-redis客户端,因为其提供的function与redis的命令基本一致,降低的了学习成本,同时功能也很全面。

一。linux安装方法

phpredis下载地址:https://github.com/nicolasff/phpredis

?

unzip phpredis-master.zip

cd phpredis-master

/usr/local/php5/bin/phpize

./configure --with-php-config=/usr/local/php5/bin/php-config

make

make install

?

vi /usr/local/php5/etc/php.ini

加入

extension=redis.so

?

保存后重启Apache,如果是连接的nginx,则需要重启php-fpm。

?

二。windows安装方法

从网上直接下载编译好的dll文件即可,一定要选择和php对应的版本。

php_redis-5.5-vc11-ts-x86-00233a.zip http://d-h.st/4A5
php_igbinary-5.5-vc11-ts-x86-c35d48.zip http://d-h.st/QGH

?

php_redis-5.5-vc11-nts-x86-00233a.zip http://d-h.st/uGS
php_igbinary-5.5-vc11-nts-x86-c35d48.zip http://d-h.st/bei

?

php_redis-5.5-vc11-ts-x64-00233a.zip http://d-h.st/1tO
php_igbinary-5.5-vc11-ts-x64-c35d48.zip http://d-h.st/rYb

?

php_redis-5.5-vc11-nts-x64-00233a.zip http://d-h.st/N0d
php_igbinary-5.5-vc11-nts-x64-c35d48.zip http://d-h.st/c1a

?

下载后将php_igbinary.dll和php_redis.dll放入php的ext目录下,

然后修改php.ini,加入这两个扩展,注意顺序不要反了。

extension=php_igbinary.dll

extension=php_redis.dll

?

重新启动Apache即可。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!