1、安裝git:yum –y install git
圖片是已經安裝過的git
2、克隆swoole源碼:git clone …
地址:
https://github.com/swoole/swoole-src/releaseshttp://pecl.php.net/package/swoolehttp://git.oschina.net/swoole/swoole
以http://git.oschina.net/swoole/swoole為例子,復制地址https://gitee.com/swoole/swoole.git
執行
git?clone?https://gitee.com/swoole/swoole.git
3、執行編譯以下命令
cd swoole
phpize (ubuntu 沒有安裝phpize可執行命令:sudo apt-get install php-dev來安裝phpize)
./configure
make?
sudo make install
(圖片示例了兩條命令)
4、安裝pecl:yum install php-devel php-pear執行一鍵安裝:pecl install swoole
5、配置php.ini
查找php.ini文件:find / -name “php.ini”
編譯安裝成功后:extension=swoole.so
6、查看swoole是否安裝成功:php –m
若看到swoole,即為安裝成功
推薦學習:?swoole視頻教程
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦