在AIX系统中,一般主机名与IP地址的解析顺序依次为:
1、DNS
2、NIS
3、/etc/hosts
要改变以上这个默认顺序,可以通过以下两种方式:
一、配置文件:
需要建立/etc/netsvc.conf
文件,同时加入一行:
hosts=local,bind,nis
此时,解析顺序为:
1、/etc/hosts
2、DNS
3、NIS
二、命令实现:
通过改变
环境变量NSORDER来调整:
export NSORDER=local,bind,nis
转载于:https://blog.51cto.com/timeng/329167