Home > Article > Backend Development > How to compile and install extended redis and swoole in php
This article mainly introduces the method of compiling and installing extensions redis and swoole in PHP. It has certain reference value. Now I share it with you. Friends in need can refer to it
wget https://github.com/edtechd/phpredis/archive/php7.zip unzip php7.zip
cd data/pkg/phpredis-php7 /usr/local/php/bin/phpize
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. #安装autoconf yum install autoconf
/usr/local/php/bin/phpize
find / -name php-config
./configure --with-php-config=/usr/local/php/bin/php-config
make & make install
vim /usr/local/php/etc/php.ini extension=redis.so
killall php-fpm /usr/local/sbin/php-fpm
git clone https://gitee.com/swoole/swoole.git
cd swoole /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make && make install
vim /usr/local/php/etc/php.ini extension=swoole.so
killall php-fpm /usr/local/sbin/php-fpm
The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!
Related recommendations:
Analysis of service container and dependency injection in PHP
Analysis of PHP container Pimple running process
Instructions for php multi-process execution tasks
The above is the detailed content of How to compile and install extended redis and swoole in php. For more information, please follow other related articles on the PHP Chinese website!