How to add redis extension to php under ubuntu system

黄舟
Release: 2023-03-16 17:04:01
Original
1578 people have browsed it

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
Copy after login

After installation, restart nginx,php5-fpm,

Restart nginx


sudo /etc/init.d/nginx restart
Copy after login

Restart php5-fmp


##

sudo /etc/init.d/php5-fpm restart
Copy after login

phpinfo is displayed on the web page:


reids See if there is


php. To operate redis, you must install the redis client



sudo apt-get install redis-server
Copy after login
You 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template