vi /etc/resolv.conf
nameserver 203.98.129.9
nameserver 203.98.129.1
nameserver 61.139.2.69
search localdomain
nameserver 203.98.129.1
nameserver 61.139.2.69
search localdomain
设置网关地址
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=59.188.15.113
HOSTNAME=localhost.localdomain
GATEWAY=59.188.15.113
设置IP地址
查看你使用的IP网卡
ifconfig -a
找到你要使用的网卡
我的是
vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
#BROADCAST=59.188.15.255
HWADDR=00:02:A5:F5:80:23
IPADDR=59.188.15.117
NETMASK=255.255.255.240
#NETWORK=59.188.15.0
ONBOOT=yes
DEVICE=eth0
BOOTPROTO=static
#BROADCAST=59.188.15.255
HWADDR=00:02:A5:F5:80:23
IPADDR=59.188.15.117
NETMASK=255.255.255.240
#NETWORK=59.188.15.0
ONBOOT=yes
OK设置完了
service network restart
类别:Linux 查看评论