1.打开 /etc/network/interfaces文件
2.配置IP,子网掩码,默认网关
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
保存退出
3.DNS服务配置
echo nameserver 211.81.200.9 > /etc/resolv.conf
4.执行 /etc/init.d/networking restart命令 配置完成