[toc]
Apache在Linux系統(tǒng)中,其實叫“httpd”,可以使用yum來進(jìn)行安裝
1、查看httpd包是否可用:
$yum list | grep httpd
2、安裝Apache
$yum install httpd
3、配置ServerName
$vi /etc/httpd/conf/httpd.conf
#添加域名:ServerName localhost:80
#啟動
$httpd
#停止
$httpd -k stop
#檢查Apache服務(wù)
$ps -ef | grep apache
#設(shè)置開機(jī)自動啟動:
$chkconfig httpd on
4、安裝目錄介紹
Apache默認(rèn)將網(wǎng)站的根目錄指向/var/www/html 目錄
默認(rèn)的主配置文件是/etc/httpd/conf/httpd.conf
配置存儲在的/etc/httpd/conf.d/目錄

目錄介紹
20171214-Boy