標籤:iptables 目錄 nbsp table eterm ati sts 檔案中 prefix
1. 從https://mirrors.tuna.tsinghua.edu.cn/apache/httpd下載httpd包 執行命令 wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.2.32.tar.gz
2. 解壓到本地 3. 進入到 httpd-2.2.32目錄 執行./configure --prefix=/usr/local/apache2 --sysconfdir=/usr/local/etc/httpd 4. 執行 make 命令5. 執行make install 命令,安裝完成6. 進入到apache安裝路徑 /usr/local/apache2/bin ,執行啟動指令碼./apachectl start 注意事項:1. 啟動之前檢查80連接埠是否開啟 netstat -tan
2. 檢查防火牆配置是否開啟80連接埠
重啟防火牆
service iptables restart
3. 如果啟動中報錯 :
httpd: apr_sockaddr_info_get() failed for captian2(主機名稱)
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName
方法 (1):
設定 /usr/local/etc/http2/httpd.conf 中的ServerName 為 ServerName localhost:80
方法(2)
在 /etc/hosts 檔案中添加自己的主機名稱,如 127.0.0.1 captain2
啟動之後,可以在瀏覽器中輸入主機ip地址,即可訪問apache頁面
centos6安裝apache2.2