进入地址:Tags · swoole/swoole-src · GitHub,找到需要安装版本的tar.gz链接地址,并在命令端使用wget命令进行下载

wget https://github.com/swoole/swoole-src/archive/v4.4.13.tar.gz
下载后对包进行解压:tar zxvf v4.4.13.tar.gz
进入解压后的目录:cd swoole-src-4.4.13,再执行如下命令:
phpize
./configure
make
make install
命令执行无误后,在php.ini配置文件的末尾加入扩展:extension=swoole.so
重启php,通过Phpinfo 或者 输入命令php -m进行查看是否安装成功
安装swoole其它扩展:
./configure --enable-openssl --with-php-config=/usr/local/php/bin/php-config && make && make insta
另:
Swoole-1.x需要 PHP-5.3.10 或更高版本
Swoole-2.x需要 PHP-7.0.0 或更高版本
Swoole-4.x需要 PHP-7.1.0 或更高版本
本文详细介绍如何从GitHub下载Swoole源码并进行安装,包括使用wget下载指定版本、解压、编译、配置php.ini及重启PHP验证安装过程。同时提供了安装额外扩展的方法。
124

被折叠的 条评论
为什么被折叠?



