Home > Article > Backend Development > Compilation and installation of swoole module: PHP compiles and installs the code of swoole module
What this article brings to you is about the compilation and installation of the swoole module: the code for php compilation and installation of the swoole module has a certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
1. Download swoole
1 wget https://github.com/swoole/swoole-src/archive/v1.9.3-stable.tar.gz
2. Install
Find some phpize and php-config paths
[root@localhost swoole]# find / -name phpize find: ‘/proc/47018’: 没有那个文件或目录 /usr/bin/phpize /www/server/php/71/src/scripts/phpize /www/server/php/71/bin/phpize [root@localhost swoole]# find / -name php-config /www/server/php/71/src/scripts/php-config /www/server/php/71/bin/php-config [root@localhost swoole]# ./configure --with-php-config=/www/server/php/71/bin/php-config
The above is mine, please follow your own path Come
tar -xf v1.9.3-stable cd ./swoole-src-1.9.3-stable/ /opt/app/php5/bin/phpize ./configure --with-php-config=/opt/app/php5/bin/php-config make && make install
3. Add configuration
1 vi /opt/app/php5/etc/php.ini 2 3 ... 4 extension=swoole.so 5 ...
4. Restart the php service
1 service php-fpm restart
5. Check whether the module is added successfully
1 php -m
Related recommendations :
Detailed analysis of the adapter pattern in php (with code)
How to debug PHP code? Summary of PHP code debugging methods (recommended)
PHP mobile phone SMS verification code implementation process under the laravel framework
The above is the detailed content of Compilation and installation of swoole module: PHP compiles and installs the code of swoole module. For more information, please follow other related articles on the PHP Chinese website!