Compilation and installation of swoole module: PHP compiles and installs the code of swoole module

不言
Release: 2023-04-03 18:12:01
Original
1608 people have browsed it

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
Copy after login

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
Copy after login

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
Copy after login

3. Add configuration

1 vi /opt/app/php5/etc/php.ini
2 
3 ...
4 extension=swoole.so
5 ...
Copy after login

4. Restart the php service

1 service php-fpm restart
Copy after login

5. Check whether the module is added successfully

1 php -m
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!