修改网卡的配置文件

vim /etc/network/interfaces

auto lo

iface lo inet loopback

auto  eth0

address   192.168.1.10

network   255.255.255.0

gateway   192.168.1.254

boroadcast   192.168.1.255

dns-nameserver  192.168.1.254  8.8.8.8