配置名称服务
将 sysconfig create-profile 命令与 naming_services 分组结合使用可生成用于配置 DNS、NIS 和 LDAP 客户机以及名称服务转换的有效配置文件。
# sysconfig create-profile -g naming_services -o sc_ns.xml
naming_services 分组包含两个 SMF 服务。
-
svc:/system/name-service/switch 服务管理命名服务。
-
svc:/network/dns/client 服务管理 DNS 服务。
svc:/system/name-service/switch SMF 服务配置名称服务转换。最初会禁用此服务,其属性值不会导致任何系统配置。请参见指定名称服务配置中的示例。svc:/system/name-service/switch 服务的 config 属性组包含下表中列出的属性。
表 11-8 svc:/system/name-service/switch 属性组的配置属性
|
|
|
|
default
|
astring
|
可选
|
缺省配置数据库条目
|
bootparam
|
astring
|
可选
|
覆盖 bootparams 数据库的配置
|
ethers
|
astring
|
可选
|
覆盖 ethers 数据库的配置
|
group
|
astring
|
可选
|
覆盖 group 数据库的配置
|
host
|
astring
|
可选
|
覆盖 host 数据库的配置
|
netmask
|
astring
|
可选
|
覆盖 netmask 数据库的配置
|
network
|
astring
|
可选
|
覆盖 network 数据库的配置
|
password
|
astring
|
可选
|
覆盖 passwd 数据库的配置
|
protocol
|
astring
|
可选
|
覆盖 protocol 数据库的配置
|
rpc
|
astring
|
可选
|
覆盖 rpc 数据库的配置
|
|
svc:/network/dns/client 服务支持 DNS 客户机的配置。该服务定义一个属性组:config。该服务使用其属性构建 DNS 服务的配置信息。请参见指定名称服务配置中的示例。
config 属性组包含下表中列出的属性。
表 11-9 config 属性组属性
|
|
|
|
domain
|
astring
|
可选
|
本地域名。用于构建 resolv.conf 中的 domain 指令。
|
nameserver
|
net_address_list
|
必需
|
IPv4 和 IPv6 地址列表。用于构建 resolv.conf 中的 nameserver 指令。
|
search
|
astring_list
|
可选
|
主机名查找的搜索列表的域值列表。用于构建 resolv.conf 中的 search 指令。
|
|