一、配置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]#