多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
注:在`lamp`环境下安装 ***** php版本7.2.10 ***** 1.安装环境准备(如果已安装,可以跳过这一步) ``` yum -y install gcc gcc-c++ autoconf automake make openssl-devel ``` 安装nghttp2 ``` [root@localhost data]# yum install -y nghttp2 ``` ***** 2.下载 swoole,下载地址:[http://pecl.php.net/package/swoole](http://pecl.php.net/package/swoole),找到最新稳定版本下载 当前swoole最新稳定版本为4.2.10 ``` [root@localhost src]# wget http://pecl.php.net/get/swoole-4.2.10.tgz ``` ***** 3.解压swoole ``` [root@localhost fukedi]# tar -zxvf swoole-4.2.10.tgz ``` ***** 4.编译安装swoole ``` [root@localhost fukedi]# cd swoole-4.2.10/ [root@localhost swoole-4.2.10]# phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [root@localhost swoole-4.2.10]# ./configure \ --enable-coroutine \ --enable-openssl \ --enable-http2 \ --enable-async-redis \ --enable-sockets \ --enable-mysqlnd [root@localhost swoole-4.2.10]# make clean find . -name \*.gcno -o -name \*.gcda | xargs rm -f find . -name \*.lo -o -name \*.o | xargs rm -f find . -name \*.la -o -name \*.a | xargs rm -f find . -name \*.so | xargs rm -f find . -name .libs -a -type d|xargs rm -rf rm -f libphp.la modules/* libs/* [root@localhost swoole-4.2.10]# make && make install ``` 最后出现以下代码,说明安装成功 ``` Installing shared extensions: /usr/lib64/php/modules/ ```