1.源代碼
安裝包格式一般爲:名稱.tar.gz 名稱.tar.bz2
步驟:
./configure 是一個shell腳本
安裝目錄 一般會安裝到bin目錄和 /sbin目錄
目錄/bin /sbin /lib /include 一般在安裝過成中會自動創建
文件一般解壓後會用到一個配置目錄 --sysconfdir
檢測安裝環境
安裝http2.4 這是安裝包
第一步 :拆包
[root@localhost src]# tar -jxvf httpd-2.4.4.tar.bz2 -C /usr/local/src
[root@localhost src]# tar -zxvf apr-1.4.6.tar.gz -C/usr/local/src
[root@localhost src]# tar -zxvf apr-1.4.6.tar.gz -C/usr/local/src
[root@localhost src]#./configure
[root@localhost src]# make
Make install
[root@localhost apr-util-1.5.1]# tar -zxvf apr-util-1.5.1.tar.gz -C /usr/local/src/
然後找到安裝目錄
[root@localhost apr-util-1.5.1]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config
Make
Make install
安裝之後 配置http2.4
再次嘗試安裝
[root@localhost httpd-2.4.4]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd
結果發現錯誤安裝時會發現Apr沒有發現
configure:
checking for APR... no
configure: error: APR not found. Please read the documentation.
我們進入 /usr/local/bin/測試
[root@localhost bin]# ./apchectl start
[root@localhost bin]# netstart -tupln|grep 80
安裝完畢!