组态DNS、搜索域名和主机名

一个、组态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]# 

版权声明:本文博客原创文章,博客,未经同意,不得转载。

原文地址:https://www.cnblogs.com/gcczhongduan/p/4746767.html