wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y httpd-* httpd
sed -i '/#/d' /etc/httpd/conf/httpd.conf
sed -i '/^$/d' /etc/httpd/conf/httpd.conf
systemctl start httpd
此时,在电脑上输入虚拟机的IP,连接超时?
不要急,正常现象
setenforce 0
systemctl stop firewalld //关闭防火墙
或
firewall-cmd --add-port=80/tcp --permanent //放行80端口
firewall-cmd --reload //不改变状态的条件下重新加载防火墙
此时在主机上打开,出现了这个,说明安装好了
本文地址:https://blog.csdn.net/weixin_45663905/article/details/107331479
如对本文有疑问, 点击进行留言回复!!
网友评论