進(jìn)入/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 改了以后再運(yùn)行/etc/init.d/network restart /etc/rc.d/init.d/network restart 需要重啟網(wǎng)絡(luò)服務(wù):service network restart 或/etc/init.d/network restart 防火墻關(guān)閉的方法:service iptables stop
|
|