反反复复的总因为一点小问题折腾好久
这次把我遇到的问题都记录下来。最简单 。 不解释无关参数
1.网卡配置:
device
hwaddr
type=Ethernet
onboot=yes
bootproto=static
ipaddr= 此处与主机同网段无冲突就行
netmask=255.255.255.0
gateway= 与主机的dns相同
dns1 = 与主机的dns相同
2.关闭SELINUX和防火墙(主机防火墙最好也关闭了)
查看selinux状态
[root@localhost ~]# sestatus -v
SELinux status: disabled
关闭selinux
1、临时关闭(不用重启机器):
setenforce 0 ##设置SELinux 成为permissive模式
setenforce 1 ##设置SELinux 成为enforcing模式
2、修改配置文件需要重启机器:(永久关闭)
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
防火墙
查询防火墙状态
Chain INPUT (policy ACCEPT)
target prot opt source destination
target prot opt source destination
target prot opt source destination