深入理解与配置 DNS 系统
1. 利用 /etc/nsswitch.conf 文件管理搜索顺序
虽然 DNS 是用于名称解析的主要系统,但并非唯一的系统。你可以将其与 NIS 系统和 /etc/hosts 文件并行设置。在这种情况下,不同系统的搜索顺序就显得尤为重要,而这个搜索顺序是由 /etc/nsswitch.conf 文件决定的。以下是该文件的示例内容:
root@RNA:~# cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference` and `info` packages installed, try:
# `info libc "Name Service Switch"` for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
对于服务器上的所有重要信息,nsswitch.conf 文件会指示应该在哪里进行搜索。以主机和
深入理解与配置DNS系统
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



