How to add redis extension to php on ubuntu system and ubuntu redis
In a recent project, if you want to use redis as a database, php is not waiting for redis extension and must be installed. How can you install it? Many of the materials I found on the Internet were pre-compiled, but they didn't succeed. So I found another method, that is, it can be directly installed without compilation.
Restart nginx after installing, php5-fpm,
Restart nginx
Sudo/etc/init. d/nginx restart
Restart php5-fmp
sudo /etc/init.d/php5-fpm restarty
Phpinfo is displayed on the webpage:
Check whether reids exist.
To operate redis in php, you must install the redis client.
sudo apt-get install redis-server
Now you can try it out.
All right, I want to go to bed, I want to get up tomorrow to get a ticket, and I will go home during the Spring Festival. This is the way I live my life. If I decide, I have to pursue it without hesitation. Sometimes my dream is always so out of reach, stick to it and get everything done.
----------------------- Beijing Haidian