PHP compile and install swool extension

Compile and install swool

1. Description

1. Operating system: CentOS
2. PHP installation directory: /usr/local/php
3. php.ini configuration file path: /usr/local/php/etc/php.ini

Two, installation

1. Download swool,

cd /usr/local/
git clone https://gitee.com/swoole/swoole.git

2. Enter the swoole directory

cd /usr/local/swoole/

3. Compile swoole

/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install

4. Support php with swool module, add vim /usr/local/php/etc/php.ini

extension=swoole.so

5. Restart php-fpm, service php-fpm restart, and you can see the option of swoole on the phpinfo page, indicating that the installation is successful.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_39218464/article/details/113764966