git clone https://github.com/swoole/swoole-src.git

cd swoole-src/



/application/php7/bin/phpize



./configure --with-php-config=/application/php7/bin/php-config



make

make instal


vim /application/php7/lib/php.ini 

添加extension=swoole

php7 -m 查看扩展

[root@localhost swoole-src]# php7 -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
fileinfo
filter
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
swoole
sysvsem
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib