构建web服务:
1.SELinux设置宽松模式
[root@svr7 ~]# setenforce 0 #设置当前系统SELinux为宽松
[root@svr7 ~]# getenforce #查看当前系统SELinux模式
Permissive
[root@svr7 ~]# vim /etc/selinux/config
SELINUX=permissive
2.防火墙设置
]# firewall-cmd --set-default-zone=trusted
3.安装httpd软件(Apache基金会)
[root@svr7 ~]# yum -y install httpd
4.书写一个页面文件
]# echo hhhhh Web > /var/www/html/index.html
5.重启httpd服务
]# > /etc/resolv.conf #清空文件内容,加快httpd启动
]# systemctl restart httpd
]# curl http://192.168.4.7
hhhhh Web