CentOS7安装Apache

1
yum install httpd

启动apache

1
systemctl start httpd.service

停止apache

1
systemctl stop httpd.service

重启apache

1
systemctl restart httpd.service

设置apache开机启动

1
systemctl enable httpd.service