第一步: 下載解壓swoolephp
yum install unzip zip -y
wget https://soft.itbulu.com/wdcp/swoole-src-swoole-1.7.21-stable.zip
unzip swoole-src-swoole-1.7.21-stable.zip
cd swoole-src-swoole-1.7.21-stableswoole
第二步:安裝編譯swoolespa
phpizedebug
咱們須要能看到上圖中的提示才能繼續下一步。3d
./configure --with-php-config=/www/server/php/56/bin/php-configrest
注意:PHP版本問題,我當前註冊環境是PHP5.6找到對應的目錄。server
第三步:安裝swooleblog
make installip
完畢以後咱們能夠看到extensions這一行的路徑,咱們要複製,等會要添加到php.ini中。部署
第四步:添加swoole擴展
extension=/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/swoole.so 將擴展路徑添加到對應php.ini文件中,重啓寶塔面板生效。
service bt restart
最後,咱們經過php -m檢查下當前安裝的擴展有沒有swoole。
安裝好swoole擴展,咱們能夠繼續使用來部署須要的程序。