下载swoole地址:
https://pan.baidu.com/s/1_N3RiFtT3iHLA5xt6oElqA
下载后解压
tar -zxvf ......
执行phpize(去php的安装目录执行这个)
如果报以下错误:
Cannot find config.m4.
Make sure that you run '/srv/php/bin/phpize' in the top level source directory of the module
解决方案:
#cd /usr/local/src/php-5.5.15/ext/openssl
#cp ./config0.m4 ./config.m4
安装swoole:
1:进入解压后的swoole文件。执行下面命令
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
2:安装完成后,进入/etc/php目录下,打开php.ini文件,在其中加上如下一句: Having finished all that, go to the path '/etc/php' and edit php.ini. Add the following line to the file:
extension=swoole.so
随后在终端中输入命令php -m查看扩展安装情况。如果在列出的扩展中看到了swoole,则说明安装成功