在Linux中设置网路,图形化很方便。在命令行下/etc/sysconfig/network-scripts/ifcfg-eth0
00、命令行下修正网路
[root@dzswj-test ~]#cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #物理设备名字
TYPE=Ethernet
UUID=c38c0e38-5da7-4f78-a3f7-f59b42ebfa29
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none #static | dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no #不开启ipv6地址
NAME="System eth0"
IPADDR=10.10.14.201
PREFIX=24
NETMASK=255.255.255.0
GATEWAY=10.10.14.1
DNS1=202.96.134.133
HWADDR=50:7B:9D:9E:6F:33 #网卡硬件地址mac
LAST_CONNECT=1460363175
01、图形化调整网络
安装图形化网络管理设备
[root@25 ~]# yum install -y NetworkManager*
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package NetworkManager-openswan-0.8.0-8.el6.x86_64 already installed and latest version
Package 1:NetworkManager-0.8.1-66.el6.x86_64 already installed and latest version
Package 1:NetworkManager-gnome-0.8.1-66.el6.x86_64 already installed and latest version
Package 1:NetworkManager-glib-0.8.1-66.el6.x86_64 already installed and latest version
Nothing to do
#调出图形化网络管理
nm-connection-editor
重启网路服务
service network restart && ip a && ifconfig