1.下载swool框架 官网手册下载
1.1切换到 cd /usr/local/src/下面
1.2 wget http://pecl.php.net/get/swool-4.0.2.tgz

13.解压 tar zxvf swoo-4.0.2.tgz 生成phpize 如图
步骤 :在swool文件里面 ,php安装路径 在swool文件里运行 /usr/local/php/bin/phpize

2.安装swool框架
2.1 ./configure 如图


2.2 make

2.3make && install

2.4安装好了 出现扩展界面


3.去php.ini文件中添加swool扩展
3.1找到php安装路径 我的是/usr/local/php/lib/php.ini文件
vim php.ini 打开文件

添加扩展

4.检查扩展是否打开
4.1 php -m 如果这个命令不存在 要加路径 export 如下图

4.2 phpinfo()

5.运行demo
5.1cd 到swool文件里面
步骤:cd /usr/local/src/swool-4.0.2/examples/server/ 运行下面的demo.php

如果没有出错 说明运行成功了
6.查看端口
6.1刚才运行的demo端口号

网友评论