源碼編譯apache 2.4.5 出現的問題

來源:互聯網
上載者:User

標籤:httpd openssl

1、解決依賴關係


httpd-2.4.5需要較新版本的apr和apr-util,因此需要事先對其進行升級。升級方式有兩種,一種是通過原始碼編譯安裝,一種是直接升級rpm包。這裡選擇使用編譯原始碼的方式進行

(1) 編譯安裝apr


# tar xf apr-1.4.6.tar.bz2

# cd apr-1.4.6

# ./configure --prefix=/usr/local/apr

# make && make install


(2) 編譯安裝apr-util


# tar xf apr-util-1.5.2.tar.bz2

# cd apr-util-1.5.2

# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

# make && make install

httpd-2.4.5編譯過程也要依賴於pcre-devel軟體包,需要事先安裝。此軟體包系統光碟片內建,因此,找到並安裝即可。

2、編譯安裝httpd-2.4.5

首先下載httpd-2.4.5到本地,下載路徑為wget http://mirrors.sohu.com/apache/httpd-2.4.5.tar.bz2而後執行如下命令進行編譯安裝過程:


# tar xf httpd-2.4.4.tar.bz2

# cd httpd-2.4.4

# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enables-modules=most --enable-mpms-shared=most --with-mpm=event


在編譯安裝時出現一些錯誤,

問題一:

  checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failure

百度了下原來沒有安裝opessl-devel,使用yum安裝

#yum -y install opessl-devel openssl 問題即可解決。

問題二:

configure: error: MPM most does not support dynamic loading.

此時將--enbale-mpm-shared改為all即可 

最後make && makeinstall 

完成後啟動服務即可進行測試



本文出自 “沐木” 部落格,請務必保留此出處http://sxhxt.blog.51cto.com/5126000/1913875

源碼編譯apache 2.4.5 出現的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.