centos7编译安装swoole4.1.1

centos7编译安装swoole通讯框架

步骤1:下载源码包

进入我的工具目录       (自己定义的专门放软件工具包的目录tools)

运行命令: cd /home/tools

运行命令: git clone  https://gitee.com/swoole/swoole.git

 

步骤2:

进入软件包目录    运行命令:cd swoole

通过php的工具包添加扩展,运行命令:phpize   (如果提示没有找不到这个,就yum install php-devel 安装一下就行。)

phpize运行成功的截图。

centos7编译安装swoole4.1.1_第1张图片

 

步骤3:

配置   运行命令:./configure   

编译  运行命令: make

安装  运行命令:make install

 

步骤4:

 修改php.ini文件  添加swoole模块,。不要忘记重启php-fpm

centos7编译安装swoole4.1.1_第2张图片

运行命令:php -m

看到已经加载swoole模块了

centos7编译安装swoole4.1.1_第3张图片

 

 

你可能感兴趣的:(服务器,后端)