1、首先我们查看一下nmcli是哪个软件包提供的
1
2
3
4
5
6
7
8
9
10
11
|
[
root
@
huis
~
]
# yum provides "*/nmcli"
Loaded
plugins:
fastestmirror
,
security
Loading
mirror
speeds
from
cached
hostfile
*
base
:
mirrors
.
cug
.
edu
.
cn
*
extras
:
mirrors
.
cug
.
edu
.
cn
*
updates
:
centos
.
ustc
.
edu
.
cn
1
:
NetworkManager
-
0.8.1
-
75.el6.i686
:
Network
connection
manager
and
:
user
applications
Repo
:
base
Matched
from
:
Filename
:
/
usr
/
bin
/
nmcli
|
2、从上面结果可以看出nmcli,接下来我们安装NetworkManager这个软件包
1
|
[
root
@
huis
~
]
# yum -y install NetworkManager
|
3、启动NetworkManager服务
1
2
3
|
[
root
@
huis
~
]
# service NetworkManager start
Setting
network
parameters
.
.
.
[
OK
]
Starting
NetworkManager
daemon
:
[
OK
]
|
4、查看网卡UUID
1
2
3
|
[
root
@
huis
~
]
# nmcli con | sed -n '1,2p'
NAME
UUID
TYPE
SCOPE
TIMESTAMP
-
REAL
System
eth0
c1021d28
-
7238
-
4f26
-
8e92
-
4aea5d607cab
802
-
3
-
ethernet
system
Mon
08
Dec
2014
12
:
49
:
14
PM
CST
|
5、检验是否与/etc/sysconfig/network-scripts/ifcfg-eth0里面的UUID值相同(注:检验只在ifcfg-eth0文件能正常查看UUID时才有效)
1
2
|
[
root
@
huis
~
]
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep UUID
UUID
=
c1021d28
-
7238
-
4f26
-
8e92
-
4aea5d607cab
|