centos7安裝 swoole詳細教程


swoole的優點就不說了,安裝對於沒接觸過的還是優點麻煩,寫個教程看看能不能幫上需要的同學們!

centos7的安裝就不說了 網上很多,一般都是虛擬機里面安裝的 ,我是在mac虛擬機里面裝的 (我裝的時候分區就沒有按照教程分區,系統自動分區的(20G)因為按照教程分區 有錯誤安裝不了)溫馨提示里面有桌面的程序看自己需不需要 ,自己選擇!

 

安裝好centos7后 咱們就開始裝swoole,二話不說先下載php ,畢竟swoole是運行在php上面的插件,php是必須的,PHP當然是7以上,php.net官網下載又慢,所以現下載它!

可以命令可以桌面訪問下:

$ cd /usr/local/src/
$ wget http://cn2.php.net/distributions/php-7.4.1.tar.bz2
$ tar jxvf php-7.4.1.tar.bz2

cd是打開目錄  這個就不用說了 (tab鍵都 不知道是怎么用的絕對小白)  上面的命令如果沒有權限記得在前面加上     『sudo 命令』空格別忘記了,這個是已管理員權限運行后面命令 肯定回輸入你的密碼

wget是一個下載文件的工具 

tar 是解壓我們下載的文件包

然后進入到目錄  編譯源碼

$ cd php-7.4.1/
$ ./configure --prefix=/usr/local/php7

溫馨提示

prefix=后面示放的目錄 可以自己修改
/usr/local/php7這個目錄沒有的需要創建  命令示例:sudo mkdir /usr/local/php7
再次聲明 如果沒有權限就 在這個命令前面加sudo 或者su

 

 

 

沒有看到Thank you for using PHP.的同學,

QQ496631085

請看你的報錯是什么示例:

 

 

這里示報錯sqlite3

 

咱們就頁面找一下報錯對應的安裝包的代碼:

解決 error: the HTTP XSLT module requires the libxml2/libxslt 錯誤

解決 error: the HTTP image filter module requires the GD library. 錯誤

解決 error: the GeoIP module requires the GeoIP library. 錯誤

解決 error: the Google perftools module requires the Google perftools 錯誤

解決 error: libatomic_ops library was not found. 錯誤

解決 error trying to exec 'cc1plus': execvp: No such file or directory 錯誤

解決 error: [pool www] cannot get uid for user 'www-data' 錯誤

解決configure: error: mbed TLS libraries not found. 錯誤。

需要安裝mbedtls,教程:https://www.24kplus.com/linux/281.html

解決 error: Cannot find OpenSSL's <evp.h> 錯誤

解決 error: Libtool library used but 'LIBTOOL' is undefined 錯誤

解決 exec: g++: not found 錯誤

解決 configure: error: tss lib not found: libtspi.so 錯誤

解決 Can't exec "autopoint": No such file or directory 錯誤

解決 configure: error: libcrypto not found. 錯誤

解決 configure: error: Package requirements (libffi >= 3.0.0) were not met: No package 'libffi'found 錯誤

解決 fatal error: uuid.h: No such file or directory 錯誤

解決 configure: error: openssl lib not found: libcrypto.so 錯誤

解決 tar (child): lbzip2: Cannot exec: No such file or directory 錯誤

解決 configure: error: C++ preprocessor "/lib/cpp" fails sanity check 錯誤

解決 configure: error: Please reinstall the BZip2 distribution 錯誤

解決 configure: error: cURL version 7.15.5 or later is required to compile php with cURL support 錯誤

解決 configure: error: not found. Please provide a path to MagickWand-config or Wand-config program 錯誤 

解決 configure: error: no acceptable C compiler found in $PATH 錯誤

解決 configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met: 錯誤

解決 configure: error: Package requirements (sqlite3 > 3.7.4) were not met: No package 'sqlite3'found 錯誤

解決 configure: error: Package requirements (oniguruma) were not met: No package 'oniguruma' found錯誤

 

https://www.24kplus.com/linux/400.html這是里面對應的代碼

QQ496631085

PHP配置成功了,下一步,進行構建安裝。使用命令:溫馨提示這個步驟大約時間要長一點
$ make && make install

如果報錯 -bash:make:command not found,是因為安裝系統的時候使用的是最小化 mini 安裝,系統沒有安裝 make、vim 等常用命令,直接 yum 安裝下即可

$ yum -y install make

 

 

 

 

 

 

 

如圖就是安裝完成了

 

 

 

 

 

 

 

此時已經安裝好了咱們在配置一下

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM