Home >Backend Development >PHP Tutorial >How to add redis extension to php under ubuntu system
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 restartphpinfo is displayed on the web page:
sudo apt-get install redis-serverYou can experience it now. Okay, it’s time to go to bed. I have to get up tomorrow to grab tickets. I’m back home for the Spring Festival. Life is like this. Once you decide, you have to pursue it without hesitation. Sometimes dreams always seem so out of reach. , bite it, hold on, everything will be connected.
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!