/etc/ypserv.conf

127.0.0.1/255.255.255.0         : * : * : none
*                               : * : * : deny

/etc/hosts

127.0.0.1       localhost.localdomain localhost

/etc/netgroup

man netgroup
(host, user, domain)
gateway (server,,) (server-sn,,) (server-bb,,)

/etc/yp/Makefile
為了增加 autofs 功能, 增加下面的東西

all:  passwd group hosts rpc services netid protocols mail \
改
all:  passwd group hosts rpc services netid protocols mail <span style="color: #ff0000;">auto.home auto.master</span> \

/etc/sysconfig/network

NISDOMAIN=some_nis_domain
YPSERV_ARGS="-p specify_port_number_for_ypserv" # 1011

/etc/sysconfig/yppasswdd

YPPASSWDD_ARGS="--port specify_port_number_for_yppasswdd" # 1012

/etc/sysconfig/nfs

RPCNFSDARGS="-p specify_port_number_for_nfsd" # 2049
MOUNTD_PORT=specify_port_number_for_mountd # 2048

/etc/auto.master

#/misc  /etc/auto.misc
#/net   -hosts
/net/home       /etc/auto.home  --timeout=30

/etc/auto.home

*               -rw.soft.intr           nfs_server_ip:/home/&amp;

以上只是做個紀錄
其中改 port number 是為了 iptables 能利用 –dport port:port 來指定, 比較方便

以上的東西可以參考
鳥哥Linux私房菜–NIS伺服器
NFS&Automount

NIS Server on CentOS 5.4

發表迴響

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料

Verified by MonsterInsights