安装对应的软件包
[root@hds ~]# yum install httpd mod_ssl -y
查看防火墙的状态和selinux
[root@hds ~]# systemctl status firewalld
[root@hds ~]# cat /etc/selinux/config
若未关闭,则关闭防火墙和selinux
[root@hds ~]# systemctl stop firewalld
[root@hds ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@hds ~]# setenforce 0
[root@hds ~]# sed "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
启动httpd服务设为开机自启
[root@hds ~]# systemctl start httpd
[root@hds ~]# systemctl enable httpd