Home  >  Article  >  Backend Development  >  How to install swoole extension in php7.1

How to install swoole extension in php7.1

王林
王林Original
2019-10-14 17:56:473856browse

How to install swoole extension in php7.1

1. Download the swoole extension

$curl -O  swoole.com/get/swoole-4.2.1.tgz

How to install swoole extension in php7.1

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

How to install swoole extension in php7.1

6. Compile the php.ini file and add swoole.so

$vim /usr/local/php/etc/php.ini

How to install swoole extension in php7.1

7. Restart php-fpm to take effect

$service php-fpm restart

How to install swoole extension in php7.1

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!

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