[root@localhost ~]# yum install httpd httpd-devel -y
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl enable httpd.service
[root@localhost ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@localhost ~]# firewall-cmd --reload
####输入自己的ip地址就可以看见了搭建成功
#######修改默认页面
[root@localhost ~]# pwd
[root@localhost ~]# cd /var/www/
[root@localhost www]# ls
[root@localhost www]# cd html
[root@localhost html]# echo "自定义内容">index.html