Chinaunix首页 | 论坛 | 博客
  • 博客访问: 360854
  • 博文数量: 100
  • 博客积分: 1894
  • 博客等级: 上尉
  • 技术积分: 951
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-11 23:17
文章分类

全部博文(100)

文章存档

2018年(3)

2014年(2)

2013年(7)

2012年(10)

2011年(8)

2010年(6)

2009年(63)

2008年(1)

分类: LINUX

2012-04-20 16:15:14

1)NFS 配置

编辑/etc/exports文件如下:
# cat /etc/exports 
/vm/home *(rw,sync,no_root_squash)

# exportfs -rv

启动服务:
# /etc/init.d/portmap start
# /etc/init.d/nfs start

2) 服务器端NIS 配置

安装NIS工具包
# yum install yp*

# nisdomainname=nis.test
 
添加下面行到/etc/sysconfig/network 文件
NISDOMAIN=nis.test

启动YP 服务
#  /etc/init.d/ypserv start

编辑 /etc/ypserv.conf 文件, 取消最后一行注释如下。

*                        : *       : *                : none

编辑YP服务的Makefile, 找到 all: passwd 开头的行并设置如下。
all:  passwd group hosts rpc services auto.master auto.home # netid protocols mail \

生成YP 数据库
# cd /var/yp
# /usr/lib64/yp/ypinit -m

按CTRL+D

然后输入 "y"

3) 客户端NIS 配置

# setup

选中 [*] NIS

下一步,

输入之前的NIS域名:nis.test
服务器 IP.
 
4) 客户端Autofs  配置

# mv /home /home_local
# mount IP:/vm/home /home

编辑/etc/auto.master并添加如下行:
/home           yp:auto.home  --timeout 300 soft,intr,retry=1,wsize=32768,rsize=32768

复制 /etc/auto.misc /etc/auto.home

编辑/etc/auto.home 并添加如下行:
*        -rw,intr          IP:/vm/home/&

启动autofs 服务.
/etc/init.d/autofs stop
/etc/init.d/autofs start















阅读(897) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~