天天看點

rhel6.5下安裝NIS伺服器

test-envnis-server--->rhel

setenforce 0
/etc/init.d/NetworkManagerstop
/etc/init.d/iptables stop
           

# 相關安裝軟體

yum install ypservrpcbind yp-tools ypbind
           

# 設定nis域名

nisdomainname test
           

# 修改相關配置檔案

vim /etc/ypserv.conf
    127.0.0.0/255.255.255.0 :   *   :  *   :   none
    192.168.10.0/255.255.255.0  :   *  :   *   :  none
           

# 啟動服務,開機自啟動

/etc/init.d/ypserv start
/etc/init.d/yppasswddstart
/etc/init.d/rpcbind start
chkconfig ypserv on
chkconfig yppasswdd on
chkconfig rpcbind on
           

# 檢視

rpcinfo -p localhost
           

# 建立使用者,指定家目錄,設定密碼

# 生成庫

/usr/lib64/yp/ypinit -m
make -C /var/yp/
           

# 測試

ypcat -h localhost passwd
           

nis-client--->client

/etc/hostname
           

# 安裝相關軟體

yum install -y yp-toolsypbind
           

# 測試

su - nisuser1
id
yppasswd
           

繼續閱讀