Home  >  Article  >  Database  >  如何在ubuntu系统上为php加上redis扩展

如何在ubuntu系统上为php加上redis扩展

WBOY
WBOYOriginal
2016-06-07 16:12:18949browse

最近一个项目,,想用redis 作为数据库,php是不待redis 扩展,必须安装,怎么安装呢?我在网上找的很多资料发现都是预编译的,但都没成功,于是就找了另外一种方法是不需要编译直接安装就可以了 安装好后重启nginx ,php5-fpm, 重启nginx sudo /etc/init.d/ng

 

最近一个项目,,想用redis 作为数据库,php是不待redis 扩展,必须安装,怎么安装呢?我在网上找的很多资料发现都是预编译的,但都没成功,于是就找了另外一种方法是不需要编译直接安装就可以了

 

安装好后重启nginx ,php5-fpm,

重启nginx

sudo /etc/init.d/nginx restart

重启php5-fmp

 

sudo /etc/init.d/php5-fpm restarty

 

phpinfo 在网页上显示:

reids 看有没有

php 操作 redis 还必须要安装redis 客户端才可以

 

sudo apt-get install redis-server  

 

现在就可以体验了。
Statement:
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