Swoole is an extension of PHP that can be installed and enabled through PHP extension.
# Local Installation (Recommended Learning: Swoole Video Tutorial )
Laradock
## If so, taking Laradock as an example, you need to set the following two lines of configuration values to true in the .env in the laradock directory:WORKSPACE_INSTALL_SWOOLE=true PHP_FPM_INSTALL_SWOOLE=true
Windows/Mac
pecl install swoole
Online installation
If you are installing on a server, take the Ubuntu system as an example and install it by executing the following command:pecl install swoole
Then locate the location of the php.ini file through php -i | grep php.ini, open the configuration file , and append the following content at the end of the file:
[swoole] extension=swoole.so
Save and exit, Run php -m in the terminal. If you see swoole included in the extension, the installation is successful.
The above is the detailed content of How to turn on swoole. For more information, please follow other related articles on the PHP Chinese website!