Heim  >  Artikel  >  Backend-Entwicklung  >  phpredis 装配

phpredis 装配

WBOY
WBOYOriginal
2016-06-13 12:28:011013Durchsuche

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即可。

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