Home >Backend Development >PHP Problem >How to install swoole extension in php7.1
1. Download the swoole extension
$curl -O swoole.com/get/swoole-4.2.1.tgz
2. Unzip the swoole package
$tar xzvf swoole-4.2.1.tgz $cd swoole-4.2.1
3. Generate configure configuration file
$cd swoole-4.2.1 $/usr/local/php/bin/phpize
4. Specify php configuration file for pre-compilation
$cd swoole-4.2.1 $./configure --with-php-config=/usr/local/php/bin/php-config
5. Compile and install
$make && make install
6. Compile the php.ini file and add swoole.so
$vim /usr/local/php/etc/php.ini
7. Restart php-fpm to take effect
$service php-fpm restart
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to install swoole extension in php7.1. For more information, please follow other related articles on the PHP Chinese website!