静态ip配置:
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth1"
IPADDR=192.168.1.166
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS=61.134.1.4
BOOTPROTO=static
HWADDR="08:00:27:2a:ef:32"
NM_CONTROLLED="yes"--------从RedHat6开始,在安装过程中默认不再人工配置网络,转为通过 Network Manager
ONBOOT="yes"------------开机启动