linux系统安装swoole
1.下载swoole官网
https://wiki.swoole.com/#/environment
2.解压zip
unzip swoole文件夹名称
3.运行phpize
/usr/local/php/bin/phpize
4.编译
./configure --with-php-config=/usr/local/php/bin/php-config
5.遇到问题的根源是缺少必要的C++库。运行如下命令解决:
yum install glibc-headers
yum install gcc-c++
6.make一下
make
make test
make install
到此安装结束
启动文件夹
cd /root/swoole/examples/server
启动swoole
php server.php
连接swooletelnet 127.0.0.1 9501
关闭进程
kill 进程端口