Contents

CentOS网卡配置

Contents

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

配置CentOS网卡及IP信息:



  
[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主机名:



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

  

配置CentOS DNS



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

  

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