当前位置: 代码迷 >> 综合 >> rhel6.5下安装NIS服务器
  详细解决方案

rhel6.5下安装NIS服务器

热度:110   发布时间:2023-10-18 12:20:34.0

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.conf127.0.0.0/255.255.255.0 :   *   :  *   :   none192.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