Home > Article > Backend Development > Detailed graphic and text explanation of adding redis extension to php
The content of this article is to share with you the detailed graphic and text explanation of adding redis extension to php. It has certain reference value. Friends in need can refer to it.
Recently, I want to study redis, just under php Added redis extension,
Specific steps
1. Download You can go to the official website to download https://pecl.php.net/package/redis
You can according to your own environment Select I downloaded 4.0
cd /usr/local/src/
wget https://pecl.php.net/get/redis -4.0.0.tgz
2. Unzip tar xvf redis-4.0.0.tgz
3. Use PHP configuration to generate configuration and enter redis
cd redis-4.0.0
## /usr/local/php/bin/phpize #php extended directory
4. Add to php extension./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
After execution Remember the above path when adding extensions Use 5. Modify php.ini My php.ini is under /usr/local/php/etc/vim /usr/local/php/etc/php.ini
Add the above extension path
extension =/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/redis.so
Add pcntl extension for php in Linux system
php Implementation code for generating static HTML articles when adding articles
Why does adding Composer auto-loading to ThinkPHP fail?
The above is the detailed content of Detailed graphic and text explanation of adding redis extension to php. For more information, please follow other related articles on the PHP Chinese website!