进入/etc/sysconfig/network-scripts。找到ifcfg-eth0.编辑它如下: DEVICE = eth0 ONBOOT = yes BOOTPROTO = static IPADDR= 10.9.100.221(你需要的固定ip) NETMASK=255.0.0.0 GATEWAY=10.255.255.254 #/etc/resolv.conf nameserver 202.109.14.5 nameserver 202.96.209.5 search localdomain 改了以后再运行/etc/init.d/network restart /etc/rc.d/init.d/network restart 需要重启网络服务:service network restart 或/etc/init.d/network restart 防火墙关闭的方法:service iptables stop
|
|