CentOS源碼編譯安裝Apache的方法

本篇內(nèi)容介紹了“CentOS源碼編譯安裝Apache的方法”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

成都創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供天柱網(wǎng)站建設(shè)、天柱做網(wǎng)站、天柱網(wǎng)站設(shè)計(jì)、天柱網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、天柱企業(yè)網(wǎng)站模板建站服務(wù),十余年天柱做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

安裝說明
安裝環(huán)境:centos-6.3
安裝方式:源碼編譯安裝
軟件:httpd-2.2.6.tar.gz | pcre-8.32.tar.gz | apr-1.4.6.tar.gz | apr-util-1.5.1.tar.gz
安裝位置:/urs/local/apache

安裝前提
系統(tǒng)已安裝了gcc和cmake,如果沒有安裝請(qǐng)參考《centos-6.3安裝配置cmake》。
執(zhí)行以下操作:

復(fù)制代碼 代碼如下:

#檢查是否安裝了apache
[root@localhost /]# rpm -qa | grep httpd
httpd-2.2.15-15.el6.centos.1.x86_64
httpd-tools-2.2.15-15.el6.centos.1.x86_64
#卸載系統(tǒng)自帶的apache
[root@localhost /]# rpm -e --nodeps httpd-2.2.15-15.el6.centos.1.x86_64
[root@localhost /]# rpm -e --nodeps httpd-tools-2.2.15-15.el6.centos.1.x86_64
#使用yum卸載
[root@localhost apache]# yum remove apache

#檢驗(yàn)apr版本,卸載安裝新版本
[root@localhost apache]# rpm -qa | grep apr
apr-1.3.9-5.el6_2.x86_64
apr-util-1.3.9-3.el6_0.1.x86_64
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
#卸載apr
[root@localhost apache]# yum remove apr
yum remove apr-util-devel apr apr-util-MySQL apr-docs apr-devel apr-util apr-util-docs
#安裝pcre
[root@localhost local]#  tar -zxv -f pcre-8.32.tar.gz
[root@localhost local]#  cd pcre-8.32
[root@localhost apr-1.4.6]# ./configure
[root@localhost apr-1.4.6]# make
[root@localhost apr-1.4.6]# make install

#安裝新版本apr
[root@localhost local]#  tar -zxv -f apr-1.4.6.tar.gz
[root@localhost local]#  cd apr-1.4.6
[root@localhost apr-1.4.6]# ./configure --prefix=/usr/local/apr
[root@localhost apr-1.4.6]# make
[root@localhost apr-1.4.6]# make install

#安裝apr-util
[root@localhost local]#  tar -zxv -f apr-util-1.5.1.tar.gz
[root@localhost local]# cd apr-util-1.5.1
[root@localhost apr-util-1.5.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@localhost apr-util-1.5.1]# make
[root@localhost apr-util-1.5.1]# make install

安裝apache
將httpd-2.4.3.tar.gz上傳到/usr/local中,執(zhí)行以下操作:

復(fù)制代碼 代碼如下:

#執(zhí)行安裝
[root@localhost local]# cd /usr/local
[root@localhost local]# tar -zxv -f httpd-2.4.3.tar.gz           #解壓壓縮包
[root@localhost local]# rm -rf httpd-2.4.3.tar.gz            #刪除壓縮包
[root@localhost local]# mv httpd-2.4.3 apache
[root@localhost local]# cd apache
#設(shè)置參數(shù)安裝
[root@localhost php5.4]# ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
[root@localhost php5.4]# make
[root@localhost php5.4]# make install

驗(yàn)證安裝
啟動(dòng)apache服務(wù)器

[root@localhost /]# /usr/local/apache/bin/apachectl start 

使用瀏覽器訪問:http://192.168.15.239/ 出現(xiàn)以下信息:

CentOS源碼編譯安裝Apache的方法

“CentOS源碼編譯安裝Apache的方法”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

當(dāng)前文章:CentOS源碼編譯安裝Apache的方法
鏈接地址:http://muchs.cn/article30/ijohpo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)、企業(yè)建站網(wǎng)站維護(hù)、建站公司響應(yīng)式網(wǎng)站、ChatGPT

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)