一、配置DNS和搜索域
专门配置DNS的文件为/etc/resolv.conf;同时我们也可以在ifcfg-eth0等网卡配置的配置文件中指定。
示例:
[root@instructor Desktop]# cat /etc/resolv.conf
search example.com
nameserver 192.168.0.254
[root@instructor Desktop]#
二、配置主机名
[root@instructor Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=instructor.example.com
NISDOMAIN=notexample
[root@instructor Desktop]#
三、配置主机记录
[root@instructor Desktop]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
::1 localhost6 localhost6.localdomain6
192.168.0.254 instructor.example.com instructor i
[root@instructor Desktop]#