1. 程式人生 > >CentOS 安裝Apache服務

CentOS 安裝Apache服務

命令 地址 start logs entos all httpd服務 p地址 redhat

Centos基於Redhat, 通過yum可以安裝所需要的軟件包。

1. yum -y install httpd , 這個會將httpd安裝在 /etc/目錄下。

2. 安裝成功後,執行以下命令來啟動httpd服務

service httpd start

3. 在瀏覽器中訪問, 下面這個IP是我的IP地址,需要替換為你自己的IP地址。

http://10.64.246.152/

會看到如下頁面。

技術分享

看到這個頁面就說明apache啟動成功了!

4. 要想查看安裝的apahche版本,執行以下命令, 我的是2.2.15版本。

http -v

技術分享

CentOS 安裝Apache服務