Prerequisites for installing swoole under Linux: (Recommended: swoole video tutorial)
Execute phpize (if php is not added to the path environment Variable, write the absolute path such as: /usr/local/php/bin/phpize )
phpize
phpize command is used to prepare the compilation environment of the PHP extension library
Compile and install
You can first check the parameters required for compilation with ./configure --help
./configure --with-php-config=/usr/local/php/bin/php-config --enable-sockets --enable-swoole --enable-mysqlnd
swoole Compilation and installation require specifying the location of the php-config file, and other parameters are determined according to your own situation.
make && make install
After the compilation is completed, you can see
Edit the php.ini configuration file to let php support swoole
extension=swoole.so
Use php -m to verify whether php supports the swoole extension
php -m |grep swoole
The above is the detailed content of What are the prerequisites for installing swoole on Linux?. For more information, please follow other related articles on the PHP Chinese website!