1 vim /etc/sysconfig/network-scripts/ifcfg-eth0 2 // 添加下面语句 3 4 ONBOOT="yes" 5 IPADDR=ip地址 6 BOOTPROTO=none 7 NETMASK=子网掩码 8 TYPE=Ethernet 9 GATEWAY=网关地址10 //查看网卡是否挂起11 service network restart12 ifconfig