Contents

CentOS网卡配置

Contents

这真没有啥好说的,直接发配置文件吧,主要是备忘

配置CentOS网卡及IP信息:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23


  
[root@TEST-Server ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0  
  
DEVICE="eth0"  
  
HWADDR="00:0C:29:14:FB:90"  
  
NM_CONTROLLED="yes"  
  
ONBOOT="yes"  
  
BOOTPROTO="static"  
  
IPADDR=192.168.20.251  
  
NETMASK=255.255.255.0  
  
GATEWAY=192.168.20.2

  

配置CentOS主机名:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11


  
[root@TEST-Server ~]# cat /etc/sysconfig/network  
  
NETWORKING=yes  
  
HOSTNAME=TEST-Server

  

配置CentOS DNS

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11


  
[root@TEST-Server ~]# cat /etc/resolv.conf  
  
nameserver 8.8.8.8  
  
nemeserver 8.8.4.4

  

CentOS 主要就是这三个配置文件了