在Hyper-V的CentOS中搭建web服务器

安装Apache

yum install httpd
apache名称在安装时为httpd
chkconfig –levels 235 httpd on

/etc/init.d/httpd start
启动httpd
vi /etc/sysconfig/iptables
修改/etc/sysconfig/iptables文件,在其中添加:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

在物理机使用浏览器访问虚拟机,测试能否成功。

猜你喜欢

转载自blog.csdn.net/u010930289/article/details/52144363