The method of adding redis extension to php on ubuntu system
This article mainly introduces the ubuntu system for php to add redis extension method, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian with you to understand.
The implementation method of adding redis extension to php on ubuntu system
A recent project, want to use redis as a database, php is not waiting for redis extension, must be installed, how to install? A lot of the information I found on the Internet was precompiled, but it didn't work, so I found another way to install it without compilation.
Install the redis extension
Sudo apt-get install git-core
Restart nginx and php5-fpm after installation
Restart nginx
Sudo / etc/init.d/nginx restart
Restart php5-fmp
Sudo / etc/init.d/php5-fpm restart
Phpinfo displays on the web page:
Reids, see if there are any.
Php operation redis must also have a redis client installed
Sudo apt-get install redis-server
You can experience it now.
All right, to sleep, tomorrow to get up to grab tickets, the Spring Festival home, life is like this, decided, it is duty-bound to pursue, sometimes dreams always seem so far away, bite ah, stick to it, everything is good.
Thank you for reading this article carefully. I hope the article "how to add redis extensions to php on the ubuntu system" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!