(1)linux下设置ip
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:4D:B0:C9"
NM_CONTROLLED="yes"
ONBOOT="yes"
IPADDR="192.168.1.174"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"
BOOTPROTO=none
TYPE=Ethernet
(2)linux下设置dns
[root@localhost ~]# vi /etc/resolv.conf
nameserver XXX.XXX.XXX.XXX
备注:如果ping域名时出现unknown host www.baidu.com 的错误 就说明是dns的配置有问题。
该博文为原创博文,如果转发请注明出处。(max.li)