1、安裝httpd:yum install httpd
2、啟動:service httpd restart
3、http若鏈接不上則查看防火牆
查看:systemctl status firewalld
service firewalld status
臨時關閉:systemctl stop firewalld
永久關閉:systemctl disable firewalld
打開:systemctl enable firewalld
4、可以嘗試先臨時關閉firewalld再永久關閉firewalld。
5、修改selinux的config文件:SELINUX=disable;查看http是否可以鏈接本地ip