1.配置网络
vi /etc/sysconfig/network-scripts/ifcfg-eth0
修改
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.1.238
PREFIX=16
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
GATEWAY=192.168.1.1
重启网卡
/etc/init.d/network restart
2、修改DNS
修改对应网卡的DNS的配置文件
vi /etc/resolv.conf
修改以下内容
nameserver 8.8.8.8
nameserver 114.114.114.114
3.设置虚拟ip
sudo ifconfig eth0:0 192.168.11.236 up
ifconfig eth0:1 192.168.1.237 netmask 255.255.0.0 up