Home >Backend Development >PHP Problem >How to install php redis

How to install php redis

藏色散人
藏色散人Original
2021-07-05 10:35:163364browse

php redis installation method: 1. Download phpredis; 2. Unzip the installation package and enter the unzipped directory; 3. Generate the configure configuration file in the current directory; 4. Compile and install; 5. In php.ini Load phpredis extension.

How to install php redis

The operating environment of this article: linux5.9.8 system, PHP5.6 version, DELL G3 computer

How to install php redis?

Linux installation of phpredis extension

1. Download phpredis:

wget http://pecl.php.net/get/redis-3.1.0.tgz
或
wget https://github.com/nicolasff/phpredis/archive/3.1.0.tar.gz

How to install php redis

2. Unzip the installation package and enter Directory after decompression

tar xzf redis-3.1.0.tgz
cd redis-3.1.0

3. Generate configure configuration file in the current directory

/usr/local/php56/bin/phpize
./configure --with-php-config=/usr/local/php56/bin/php-config

How to install php redis

4. Compile and install

make && make install

How to install php redis

5. Finally load the phpredis extension in php.ini

extension=redis.so

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install php redis. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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