Debian下NIS服务器安装配置
2014-12-29 11:09
423 查看
Debian下集群构建之------NIS服务器安装配置 0 网络拓扑 nis server: 192.168.16.2 nis client: 192.163.16.31 服务器端配置 添加测试用户 $ sudo adduser nistest 软件安装 $ sudo aptitude update $ sudo aptitude install nis portmapNIS 服务的控制启动 $ sudo /etc/init.d/nis start 停止 $ sudo /etc/init.d/nis stop 重启 $ sudo /etc/init.d/nis restart 配置1. 修改配制文件 /etc/defaultdomain 内容如下, 设定 NIS 的域: nis 2. 执行 $ sudo domainname nis3. 修改配置文件 /etc/default/nis 确保有如下设置, 设定为 NIS 主服务器 NISSERVER=master NISCLIENT=true4. 重启服务 /etc/init.d/nis restart Starting NIS services: ypserv yppasswdd ypxfrd ypbind 生成映射文件用户可以使用 make 命令初始化独立服务器,建立NIS映射表,文件 /var/yp/Makefile 包含了创建数据库的命令, 可以通过编辑Makefile指定系统准备分发哪些映射表。比如: ALL = passwd group hosts rpc services netid protocols netgrp 使用 make 命令初始化独立服务器 $ cd /var/yp $ sudo make测试使用 ypwhich 命令测试与服务器的连接情况 $ ypwhich 192.168.16.2 安全配制在配置文件 /etc/ypserv.securenets 中,添加可以访问的客户机的ip地址范围,比如允许 192.168.16.0/255.255.255.0 网络段的所有主机访问 255.0.0.0 127.0.0.0 255.255.255.0 192.168.16.0 映射文件的访问控制可以通过修改主配置文件: /etc/ypserv.conf 来设定对映射文件的访问权限. 配置文件的语法/格式 <设置项目>:<值> <主机名称/IP>:<网段名称>:<数据库类型>:<安全性> * 主机名称/IP:通常可以这样设置:192.168.16.0/255.255.255.0,表示192.168.16.0/24整个网段; * 网段名称:通常设置为*即可; * 数据库类型:可以使用 '*' 来表示所有类型; * 安全性:主要有三种参数: o none:可以无条件进入本机; o port:仅允许1024以下的端口进入; o deny:不允许其它用户进入本机; 由于这次的目标比较简单, 所以所有参数都使用默认设置: # Host : Domain : Map : Security # # * : * : passwd.byname : port/mangle # * : * : passwd.byuid : port/mangle # This is the default - restrict access to the shadow password file, # allow access to all others. * : * : shadow.byname : port * : * : passwd.adjunct.byname : port * : * : * : none 2 客户端配置 软件安装 $ sudo aptitude update $ sudo aptitude install nis portmap配置1. 修改配置文件 /etc/default/nis 确保有如下设置,配置为 NIS 客户端 NISSERVER=false NISCLIENT=true2. 在配置文件 /etc/hosts 中添加 NIS 服务器的记录 192.168.16.2 nisserv3. 修改 /etc/defaultdomain 内容如下, 设定 NIS 域 nis4. 执行命令 $ sudo domainname nis5. 修改配置文件 /etc/yp.conf, 加入如下内容, 指定索要使用的 NIS 服务器 ypserver nisserv 或ypserver 192.168.16.26. 确保配置文件 /etc/nsswitch.conf 中,passwd, group, shadow 和 netgroup 条目如下设置 passwd: compat nis group: compat nis shadow: compat nis1. 使用 ypwhich 测试 $ ypwhich nisserv2. 使用 yptest 测试$ yptest3. 使用 ypcat 测试$ ypcat passwd3 使用 在客户端,使用服务器端的测试用户 nistest 用户登录, 系统从 NIS 服务器获取 nistest 用户的信息, 登录成功: debian login: nistest Password: Linux debian 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No directory, logging in with HOME=/ nistest@debian:/$参考:http://debian.linuxsir.org/doc/i ... bian.conf.html#toc3 小编有改动!! |
相关文章推荐
- linux debian安装配置SVN服务器
- linux debian安装配置SVN服务器
- 在 Debian Linux 上安装配置 ISC DHCP 服务器
- Debian系统下安装和配置cvs服务器
- Nis服务器主从安装配置
- Debian或Ubuntu下squid的安装与基本配置(已验证) - [服务器区]
- 在debian下安装配置tftp服务器
- Debian/linux 安装配置ftp服务器
- DEBIAN 下安装nfs服务器以及配置简单方法(做了些修改)
- 惠普(HP)服务器的安装和配置
- WIN2000(NT)中一些服务器软件的安装配置全过程
- 安装程序配置服务器失败。参考服务器错误日志和 C:\WINNT\sqlstp.log 了解更多信息。
- SQLServer 安装过程出错 安装程序配置服务器失败 (解决篇)
- Debian安装配置常用软件
- SQL Server安装出错:安装程序配置服务器失败的解决方法 [转]
- 安装Solaris之后:9个主要的设置,以及NFS和NIS的配置
- cloudscape网络配置,roller服务器安装,以及一些我喜欢犯的小错误
- reeBSD网站平台建设全过程(四、安装配置ftp服务器)
- FreeBSD网站平台建设全过程(六、安装配置视频点播服务器)
- WebSpy服务器安装与配置