swoole安装
1.环境要求
php-7.1 或更高版本
gcc-4.8 或更高版本
make
autoconf
2.依赖安装
yum -y install gcc gcc-c++ autoconf automake
yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel
3.php7操作
卸载PHP低版本
yum remove php* php-common
rpm安装php7.1相应的yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装PHP7.1
yum install php71w php71w-opoache php71--cli php71w-devel php71w-fpm
4.安装swoole
yum install git
git clone https://github.com/swoole/swoole-src.git
解压编译
cd swoole-src
phpize
./configure
make && make install
报错提示
make: *** No targets specified and no makefile found. Stop. //检查依赖
5.文件配置
新增配置
extension_dir = "/usr/lib64/php/modules/"
extension=swoole.so