下面由centos教程欄目給大家總結(jié)CentOS下Apache安裝,希望對需要的朋友有所幫助!
CentOS下Apache安裝總結(jié)
環(huán)境(Environment)
操作系統(tǒng):CentOS 6.8
服務(wù)器:Apache 2.4.29
其他關(guān)鍵依賴庫:apr 1.6.3、apr-util 1.6.1、pcre-8.41
命令(Command)
- 解壓命令
命令格式 | 命令說明 | 命令參數(shù)解釋 |
---|---|---|
tar zxvf [dir1] -C [dir2] | 將dir1下的文件解壓到dir2指定的目錄下 | 無 |
rpm -qa [software-name] | 查詢指定的軟件 | 無 |
rpm -e –nodeps [software-full-name] | 卸載指定名稱的軟件 | –nodeps:不做軟件之間的依賴檢查 |
./configure –prefix=[dir] –with-[lib] | 無 | –prefix:指定安裝目錄–with-[lib]:依賴(個人理解) |
- Apache安裝
- 編譯安裝(make install)
問題(problem)
發(fā)生時間 | 錯誤內(nèi)容 | 解決方案(個人) | 解決方案(網(wǎng)絡(luò)) | 權(quán)重 |
---|---|---|---|---|
Apache 安裝時 | error:Cannot use an external APR with the bundled APR-util | 對apr-util重新進行編譯安裝 | 低 | |
Apache 安裝時 | error:Did not find pcre-config script at [dir] | 將pcre2替換為pcre,然后進行編譯安裝 | 低 | |
pcre安裝時 | error: You need a C++ Compiler for C++ Support | yum install -y gcc gcc-c++ | 低 | |
Apache 安裝時 | error:pcre-config for libpcre not found | 在./configure 配置時使用–with-pcre=[dir]指定pcre安裝目錄 | 重新安裝或者第一次安裝pcre | 低 |
Apache 安裝時 | error:no acceptable C complier found in $PATH | yum -y install gcc | 高 | |
apr-util 安裝時 | (一部分錯誤提示)error:'apr_xml_parser' has no memebr named 'xp' | yum install expat-devel | 低 | |
Apache 安裝時 | (一部分錯誤提示)error:openssl version is too old | yum install openssl-develyum update openssl | 高 |
第一次編寫這種總結(jié),如有不對之處,歡迎dalao指出(給dalao遞女裝)。