1安裝依賴包
yum -y install gcc gcc-c++ autoconf automake
yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-develphp
2安裝Git
yum install gitnginx
3 安裝clone swoole源碼c++
git clone https://github.com/swoole/swoole-src.gitgit
4解壓編譯github
cd swoole-src
phpize
./configure
make && make installswoole
五、修改php.ini配置文件(加在前面沒有註釋符的任意一行)php-fpm
extension_dir = "/usr/lib64/php/modules/"
extension=swoole.sorest
6重啓 php
systemctl restart nginx.service
systemctl restart php-fpm.servicessl