linux Apache 安装与配置

1.搭载光盘

mkdir media/cdrom 
mount dev/cdrom /media/cdrom 

2.搭载本地yum源(上面有)

3.安装httpd服务

[root@localhost /]# cd media/cdrom
[root@localhost cdrom]# cd Packages
[root@localhost Packages]# yum install httpd -y(安装httpd服务)

4.管理httpd服务

[root@localhost Packages]# systemctl start httpd.service  #启动
[root@localhost Packages]# systemctl stop httpd.service  #关闭
[root@localhost Packages]# systemctl restart httpd.service  #重启
[root@localhost Packages]# systemctl status httpd.service  #查看运行状态
[root@localhost Packages]# systemctl enable httpd.service  #设置为开机自启 (不影响现在的状态)
[root@localhost Packages]# systemctl disable httpd.service  #设置为开机不自启(不影响现在的状态

5.httpd的配置文件

[root@localhost /]# cd /etc/httpd/conf
[root@localhost conf]# vi httpd.conf

 

posted @ 2016-10-17 21:02  小丑的·凡尘朽  阅读(443)  评论(0编辑  收藏  举报