This article mainly introduces the relevant information on the implementation method of adding redis extension to PHP on the Ubuntu system. I hope this article can help everyone to realize such a function. Friends who need it can refer to it
How to implement the redis extension for PHP on the ubuntu system
In a recent project, I wanted to use redis as the database. PHP does not require the redis extension and must be installed. How to install it? A lot of information I found on the Internet was pre-compiled, but failed, so I found another method that can be installed directly without compilation.
Install redis extension
sudo apt-get install git-core
After installation, restart nginx,php5-fpm,
Restart nginx
sudo /etc/init.d/nginx restart
Restart php5-fmp
##
sudo /etc/init.d/php5-fpm restart
sudo apt-get install redis-server
The above is the detailed content of How to add redis extension to php under ubuntu system. For more information, please follow other related articles on the PHP Chinese website!