這幾天裝了kali linux,所以把這次apache的安裝經驗記錄下來希望能幫到各位師傅
wget
解壓
tar –zxvf httpd-2.4.33.tar.gz
進入解壓
cd ./httpd-2.4.33
安裝 假定安裝目錄為/usr/install/apache2
./configure --prefix= /usr/install/apache2
這裡可能會遇到error:apr not found 不要急下面有解決方案(若沒有請忽略)
執行
安裝完成後會看到install目錄下有乙個apache2的檔案,我們到目錄下看看都有什麼install
make
install
apache2下有很多檔案,這裡就不介紹啦。cd ./usr/install/apache2
ls
我們這裡直接切到bin目錄啟動apache
然後我們開啟瀏覽器訪問http://localhost/看看有沒有成功cd ./bin
./apachectl start
我這裡是輸出it works!其他的版本可能有所差異請自測。
這裡提一下訪問的頁面檔案在/htdocs 下,可以檢視是否和自己訪問的一致。
安裝成功後的其他配置請各位師傅自行配置啦!
下面開始相應的安裝,我這裡假定目錄都在/uer/intall/ 檔案下wget
wget
wget
安裝apr
安裝apr-utiltar -zxf apr-1.4.5.tar.gz
cd apr-1.4.5
./configure --prefix=/usr/install/apr
make
&&make
install
安裝pcretar -zxf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/install/apr-util --with-apr=/usr/install/apr
make
&&make
install
如果是上面提到apache安裝的時候碰到的問題,那在安裝的時候記得加上unzip -o pcre-8.10.zip
cd pcre-8.10
./configure --prefix=/usr/install/pcre
make
&&make
install
最後接著apache後面的安裝、啟動、測試以及配置就ok啦!./configure --prefix=/usr/install/apache2 \
--enable-modules=all \
--enable-mods-shared=all \
--enable-so \
--with-apr=/usr/install/apr \
--with-apr-util=/usr/install/apr-util/ \
--with-pcre=/usr/install/pcre
這裡提一下也可以通過yum安裝,請各位師傅自測。
本次安裝經驗其中有個別細節沒有記錄,請各位像我一樣的小白安裝的時候多加注意。這也是第一次寫部落格,沒有經過太多的斟酌,希望各位師傅包涵。希望各位師傅批評指正,共同學習進步
最後感謝各位師傅的閱讀。
ubuntu linux下重啟apache命令
linux系統下重啟apache命令 首先要知道的是重啟apache命令需要root許可權,若不是root使用者需要在命令前新增sudo命令臨時轉換為超級使用者root 1.啟動apache服務 start etc init.d apache2 start root使用者 sudo etc init...
Apache下配置多個站點
1.修改 apache conf httpd.conf 把include conf extra httpd vhosts.conf前面的 去掉 2.修改 apache conf extra httpd vhost.conf servername localhost documentroot f we...
Linux下apache目錄明細
bin目錄中包括了apache伺服器執行和管理所需的執行程式,其中httpd是伺服器的執行程式,apachectl是伺服器的啟動指令碼 lib目錄中儲存了apache伺服器執行所需的庫檔案 conf目錄用於儲存apache伺服器的配置檔案,其中httpd.conf是apache伺服器的主配置檔案 h...