西西軟件園多重安全檢測下載網(wǎng)站、值得信賴的軟件下載站!
軟件
軟件
文章
搜索

首頁編程開發(fā)java → Ubuntu中安裝Apache2的最佳方法和代碼實(shí)現(xiàn)

Ubuntu中安裝Apache2的最佳方法和代碼實(shí)現(xiàn)

相關(guān)軟件相關(guān)文章發(fā)表評論 來源:本站整理時(shí)間:2010/8/20 11:17:00字體大小:A-A+

作者:佚名點(diǎn)擊:1255次評論:0次標(biāo)簽: Ubuntu Apache

PPS for Ubuntu1.0.0.1 官方安裝版
  • 類型:網(wǎng)絡(luò)電視大。1.5M語言:中文 評分:6.6
  • 標(biāo)簽:
立即下載

下載httpd-2.2.15.tar.gz,使用tar zxvf httpd-2.2.15.tar.gz解壓。如解壓后的路徑為:/software/httpd-2.2.15。
首先安裝apr apr-util (不推薦) Java代碼
# cd /software/httpd-2.2.15/srclib/apr
# ./configure --prefix=/usr/local/apr
# make
# make install

#cd /software/httpd-2.2.15/srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install

# cd /software/httpd-2.2.15/srclib/apr
# ./configure --prefix=/usr/local/apr
# make
# make install

#cd /software/httpd-2.2.15/srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install 另一種安裝apr apr-util方法:(推薦)
Java代碼
到官網(wǎng)http://apr.apache.org/
下載apr-1.4.2.tar.gz 和 apr-util-1.3.9.tar.gz
tar zxvf apr-1.4.2.tar.gz
cd apr-1.4.2
./configure --prefix=/usr/local/apr
make
make install

tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

到官網(wǎng)http://apr.apache.org/
下載apr-1.4.2.tar.gz 和 apr-util-1.3.9.tar.gz
tar zxvf apr-1.4.2.tar.gz
cd apr-1.4.2
./configure --prefix=/usr/local/apr
make
make install

tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
安裝apache
Java代碼
#cd /software/httpd-2.2.15
#./configure --prefix=/usr/local/apache --enable-module=so --enable-mods-shared=all --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --with-mpm=worker --enable-ssl --enable-deflate --with-included-apr --enable-so --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util
#make
#make install

#cd /software/httpd-2.2.15
#./configure --prefix=/usr/local/apache --enable-module=so --enable-mods-shared=all --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --enable-static-support --enable-static-htpasswd --enable-static-htdigest --enable-static-rotatelogs --enable-static-logresolve --enable-static-htdbm --enable-static-ab --enable-static-checkgid --with-mpm=worker --enable-ssl --enable-deflate --with-included-apr --enable-so --enable-rewrite=share --enable-proxy=share --enable-proxy-ajp=share --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util
#make
#make install
如果出現(xiàn)以下錯(cuò)誤,請檢查系統(tǒng)中是否已經(jīng)安裝zlib 
 Java代碼
checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures 安裝zlib如下:
Java代碼
#tar -xvzf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure
#make
# make install

#tar -xvzf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure
#make
# make install 如果出現(xiàn)以下錯(cuò)誤,請檢查是否已經(jīng)安裝OpenSSL

 Java代碼
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected

checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected 請到http://www.openssl.org/source/下載最新版本。

安裝openssl如下:
 Java代碼
1、解壓軟件:
# tar xvfz openssl-0.9.6b.tar.gz
2、安裝
# cd openssl-0.9.6b
# ./config
# make
# make test
# make install

1、解壓軟件:
# tar xvfz openssl-0.9.6b.tar.gz
2、安裝
# cd openssl-0.9.6b
# ./config
# make
# make test
# make install如果問題還是無法解決,請輸入以下命令去完成:

 Java代碼
apt-get install openssl libssl-dev

apt-get install openssl libssl-dev
如果出現(xiàn)以下錯(cuò)誤,請檢查是否已經(jīng)安裝libtool

Java代碼
libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apr-util/lib
make[2]: *** [install] 錯(cuò)誤 1
make[2]:正在離開目錄 `/usr/java/httpd-2.2.15/srclib/apr-util'
make[1]: *** [install-recursive] 錯(cuò)誤 1
make[1]:正在離開目錄 `/usr/java/httpd-2.2.15/srclib'
make: *** [install-recursive] 錯(cuò)誤 1

libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apr-util/lib
make[2]: *** [install] 錯(cuò)誤 1
make[2]:正在離開目錄 `/usr/java/httpd-2.2.15/srclib/apr-util'
make[1]: *** [install-recursive] 錯(cuò)誤 1
make[1]:正在離開目錄 `/usr/java/httpd-2.2.15/srclib'
make: *** [install-recursive] 錯(cuò)誤 1 在http://ftp.gnu.org/gnu/libtool/libtool-2.2.8.tar.gz下載。

安裝libtool如下:
Java代碼
tar zxvf libtool-2.2.8.tar.gz
cd libtool-2.2.8
./configure
make
make install

    相關(guān)評論

    閱讀本文后您有什么感想? 已有人給出評價(jià)!

    • 8 喜歡喜歡
    • 3 頂
    • 1 難過難過
    • 5 囧
    • 3 圍觀圍觀
    • 2 無聊無聊

    熱門評論

    最新評論

    發(fā)表評論 查看所有評論(0)

    昵稱:
    表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
    字?jǐn)?shù): 0/500 (您的評論需要經(jīng)過審核才能顯示)