源代码编译安装Apache2
生活随笔
收集整理的這篇文章主要介紹了
源代码编译安装Apache2
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
首先準(zhǔn)備我們需要的軟件及我所使用版本如下:
httpd-2.4.33.tar.gz(官網(wǎng)要求)
apr-1.6.3.tar.gz(官網(wǎng)要求)
apr-util-1.6.1.tar.gz(官網(wǎng)要求)
pcre-8.42.tar.gz(官網(wǎng)要求)
expat-2.1.0.tar.gz(非必須,用于解決apr-util make時(shí)出現(xiàn)的make[1]: * [xml/apr_xml.lo] Error 1)
1 解壓httpd
tar -zxvf httpd-2.4.33.tar.gz2 解壓編譯apr
tar -zxvf apr-1.6.3.tar.gz cd apr-1.6.3 #備份cp -rf apr-1.6.3 /httpd-安裝路徑根目錄/srclib/apr ./configure --prefix=/httpd-安裝路徑根目錄/srclib/apr make make install3 解壓apt-util (此文無需編譯)
tar -zxvf apr-util-1.6.1.tar.gz cd apr-util-1.6.1 #備份cp -rf apr-util-1.6.1 /httpd-安裝路徑根目錄/srclib/apr-util ./configure --prefix=/httpd-安裝路徑根目錄/srclib/apr-util --with-apr=/httpd-安裝路徑根目錄/srclib/apr make make install4 編譯安裝pcre
tar -zxvf pcre-8.42.tar.gz cd pcre-8.42 ./configure --prefix=/httpd-安裝路徑根目錄/srclib/pcre make make install5 編譯httpd
cd /httpd-安裝路徑根目錄 #prefix用于指定安裝路徑,這里為/usr/apache2 ./configure --prefix=/usr/apache2 --with-includer-apr=/httpd-安裝路徑根目錄/srclib/apr --with-includer-apr-util=/httpd-安裝路徑根目錄/srclib/apr-util make make install6 啟動(dòng)apache2
cd /usr/apache2 #修改ServerName vim conf/httpd.conf 修改:ServerName localhost:80 #啟動(dòng) cd .. cd bin ./apachectl start #訪問網(wǎng)址:localhost 是否出現(xiàn)It works!字樣,表示成功!附:
(1)上述軟件下載路徑
https://download.csdn.net/download/u014271612/10334082
(2)apache2配置ssl
https://blog.csdn.net/u014271612/article/details/79854031
總結(jié)
以上是生活随笔為你收集整理的源代码编译安装Apache2的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 斐讯K2 22.4.6.3 非telne
- 下一篇: Apache2配置SSL