ip设置
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static //这个得注意静态
DEFROUTE=yes
HWADDR= MAC地址,这个一般都识别出来了,不用改
IPADDR= IP地址
NETMASK= 子网掩码 //这个也是必须的,没有配置这个也是不能上网的, 还要用桥接模式
GATEWAY= 网关
ONBOOT=yes //必须为yes ,要不然ip addr 没有inet,也连接不上
DNS1= //dns必须
DNS2=221.98.2.4
/etc/rc.d/init.d/network restart 或 service network restart
yum -y install net-tools (-bash: ifconfi: 未找到命令)
vi /etc/selinux/config,将SELINUX=enforcing改为SELINUX=disabled,然后保存退出。
ip addr 查看ip