/ php

swoole

➜  ~ sudo pecl install swoole
downloading swoole-2.2.0.tgz ...
Starting to download swoole-2.2.0.tgz (853,688 bytes)
................................done: 853,688 bytes
248 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed

需要安装默认 PHP 版本对应的 php-devel 包,因为我的默认 PHP 版本是 php70w:

➜  ~ sudo yum install php70w-devel
➜  ~ sudo pecl install swoole

Build process completed successfully
Installing '/usr/lib64/php/modules/swoole.so'
Installing '/usr/include/php/ext/swoole/config.h'
install ok: channel://pecl.php.net/swoole-2.2.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=swoole.so" to php.ini