Homestead installation swoole

Installation Notes

According to Swoole documents directly install

pecl install swoole

The default is the latest version, if your environment is not the latest php, PHP versions that need to follow to install in accordance with
the following are installed PHP version 7.1 is an example of swoole of:

pecl -d php_suffix=7.1 install swoole

You can also specify version:

pecl -d php_suffix=7.1 install swoole-1.9.23

If the error, then try root privileges

sudo pecl install swoole

Problems may be encountered

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update

What we can directly update

pecl channel-update pecl.php.net

Find a location under the php.ini

php -i |grep php.ini

Then add in php.ini

extension=swoole.so

I remember the next restart nginx

/etc/init.d/nginx restart

See if successfully loaded at the swoole

php -m | grep swoole

Guess you like

Origin www.cnblogs.com/senkorl/p/11372313.html