- 安裝
yum install -y httpd
- 啟動(dòng)apache
systemctl start httpd.service
- 設(shè)置Apache開(kāi)機(jī)啟動(dòng)
systemctl enable httpd.service
- apache命令相關(guān)命令
// 啟動(dòng)apache
systemctl start httpd.service
// 停止apache
systemctl stop httpd.service
// 重啟apache
systemctl restart httpd.service
// 設(shè)置apache開(kāi)機(jī)啟動(dòng)
systemctl enable httpd.service
重啟后嵌削,在瀏覽器輸入域名或IP地址毛好,如果是本機(jī)可以輸入localhost進(jìn)行測(cè)試。