PHP安装swoole扩展

安装 swoole 扩展,一般有两种方式:

1.使用 pecl 安装

pecl install swoole

2.手动编译安装

可以到 swoole 官网下载源代码,然后进行编译安装。以下是一些常见的步骤,具体步骤可能会根据不同的系统和版本有所不同。

wget https://github.com/swoole/swoole-src/archive/v4.4.16.tar.gz
tar zxvf v4.4.16.tar.gz
cd swoole-src-4.4.16
phpize
./configure
make
make install

在安装成功后,需要在 php.ini 中添加以下配置:

extension=swoole.so

你可能感兴趣的:(php)