How to add redis extension to php on ubuntu system and ubuntu redis

Source: Internet
Author: User
Tags install redis

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



















Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.