Apache 2,4版本 编译与安装 RedHat enterprises 6.2
只針對Apache 2,4版本 ,之前版本不存在這個問題
到http://httpd.apache.org/下載以源碼方式安裝,我下載的版本是Apache httpd 2.4.3
解壓:[root@localhost apache]# tar -jxvf httpd-2.4.3.tar.bz2
配置環境:
[root@localhost httpd-2.4.3]# ./configure --prefix=/usr/local/apache2??--enable-so --enable-mods-shared=all --enable-modules=most
提示configure: error: APR not found. Please read the documentation,
解決:
缺少Apr,下載http://projects.apache.org/indexes/quick.html
解壓:[root@localhost apache]# tar zxvf apr-1.4.6.tar.gz
配置環境:
[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之后,繼續編譯apache,又有如下的提示configure: error: APR-util not found.??Please read the documentation
解決:
缺少APR-util,http://apr.apache.org/下載
解壓:?[root@localhost apache]# tar zxvf apr-util-1.4.1.tar.gz
配置環境:
在?[root@localhost apr-util-1.4.1]./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config時,提示configure: error: APR could not be located. Please use the --with-apr option,這是路徑的問題(這個問題困擾我好久了,在這里找到了說明http://apache.jz123.cn/install.html),應該用下面的命令[root@localhost apr-util-1.4.1]./configure??--with-apr=/usr/local/
繼續編譯Apache,暈啊,仍沒有成功,提示如下configure: error: pcre-config for libpcre not found. PCRE is required and available from?http://pcre.org/
解決:
下載prce,網址http://sourceforge.net/projects/pcre/
解壓:unzip pcre-8.31.zip
配置環境:
[root@localhost pcre-8.31]#./configure --prefix=/usr/local/
編譯和安裝:
[root@localhost pcre-8.31]#make
[root@localhost pcre-8.31]#make install
再次編譯Apache,皇天不負有心人啊,終于通過了!此時運行httpd(service httpd start),在瀏覽器上輸入127:0:0:1,就能看到下面的了
This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page,?it means that the Apache HTTP server installed at this site is working properly.
轉載于:https://blog.51cto.com/frankch/1742849
總結
以上是生活随笔為你收集整理的Apache 2,4版本 编译与安装 RedHat enterprises 6.2的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Clone Graph
- 下一篇: Mockito 简明教程