centos6.5设置静态ip

vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.15.10
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=192.168.15.2
DNS1=114.114.114.114


# 可以不修改
vi /etc/resolv.conf
DNS1=114.114.114.114


service network restart
/etc/init.d/network restart

猜你喜欢

转载自xinyuemengxing.iteye.com/blog/2257580