擴充套件安裝: 參考github位址
安裝:
pecl install swoole
git clone && \cd swoole-src && \
phpize && \
./configure && \
make && sudo make install
注意點: 使用原始碼進行安裝的時候,遇到的問題總結
1)phpize命令無法找到,使用絕對路徑即可解決
2)./configure 的時候出錯:configure: error: cannot find php-config. please use --with-php-config=path 指定php配置檔案目錄即可 ./configure --with-php-config=/usr/local/php/bin/php-config 即可
常用命令:
1. 檢視php擴充套件的相關配置
php --ri swooleswoole
swoole support =>enabled
version => 4.2.10
author =>swoole group[email: [email protected]]
coroutine =>enabled
epoll =>enabled
eventfd =>enabled
signalfd =>enabled
cpu_affinity =>enabled
spinlock =>enabled
rwlock =>enabled
pcre =>enabled
zlib =>enabled
mutex_timedlock =>enabled
pthread_barrier =>enabled
futex =>enabled
async_redis =>enabled
directive => local value =>master value
swoole.enable_coroutine => on =>on
swoole.aio_thread_num => 2 => 2
swoole.display_errors => on =>on
swoole.use_shortname => on =>on
swoole.fast_serialize => off =>off
swoole.unixsock_buffer_size => 8388608 => 8388608
swoole安裝基本配置
swoole擴充套件是按照php標準擴充套件構建的。使用phpize來生成編譯檢測指令碼,configure來做編譯配置檢測,make進行編譯,make install進行安裝。如果當前使用者不是root,可能沒有php安裝目錄的寫許可權,安裝時需要sudo或者su如果是在git分支上直接git p...
php 安裝swoole擴充套件
2 解壓unzip swoole src master.zip 3 編譯發現沒有configure 使用phpize 生成 configure 進入到swoole 解壓後的目錄 cd usr local src swoole src master 執行phpize usr local php7 bi...
php安裝swoole擴充套件
pecl download swoole解壓並進入目錄 tar zxvf swoole 4.3.3.tar.gz cd swoole 4.3.3執行phpize生成configure可執行檔案 這裡的目錄一定是你要安裝swoole擴充套件對應的php版本的安裝目錄,如果存在多個php版本一定要注意這...