nfs和nis配.docVIP

  • 3
  • 0
  • 约13.33万字
  • 约 30页
  • 2016-12-03 发布于河南
  • 举报
nfs和nis配

nfs和nis配置 NFS服务器配置 安装相关的rpm包 nfs-utils-1.0.9-16.el5 编辑vim /etc/exports在里面添加共享目录 /tmp *(ro,sync) 把此目录共享,*号代表所有的主机可以挂载次目录,然后是read-only /data *.(ro,sync)(这个网域的主机都可以) (rw,sync)(这个主机可以写) /data1 /(sync)(没有注名,默认情况下也是ro) sync是synchronize简写,是同步的意思,是说/tmp目录有更新时,通知其他的client端. 修改完/etc/exports里面的设定后,可以执行exportfs -r来是设定生效。 service nfs restart showmount -e (客户端操作)可以查看服务器分享的目录 mount-t nfs :/tmp /mnt/nfs 在client挂载的方法 nis服务器配置 服务器端: 安装相关的rpm包 rpm -ivh ypserv-2.19-3.i386.rpm rpm -ivh portmap-4.0-63.i386.rpm yppasswdd 编辑/etc/sysconfig/network 添加 NISDOMAIN=notexample(名字随便起) (vim /var/yp/securenets添加 55 允许上面的网段的主机访问nis服务器) 或者执行 [root@server1 ~]# cp /usr/share/doc/ypserv-2.19/securenets /var/yp/securenets然后编辑/var/yp/securenets 对访问设置默写要求 service ypserv start 或者/etc/init.d/portmap restart 编辑vim /var/yp/Makefile # # Makefile for the NIS databases # # This Makefile should only be run on the NIS master server of a domain. # All updated maps will be pushed to all NIS slave servers listed in the # /var/yp/ypservers file. Please make sure that the hostnames of all # NIS servers in your domain are listed in /var/yp/ypservers. # # This Makefile can be modified to support more NIS maps if desired. # # Set the following variable to -b to have NIS servers use the domain # name resolver for hosts not in the current domain. This is only needed, # if you have SunOS slave YP server, which gets here maps from this # server. The NYS YP server will ignore the YP_INTERDOMAIN key. #B=-b B= # If we have only one server, we dont have to push the maps to the # slave servers (NOPUSH=true). If you have slave servers, change this # to NOPUSH=false and put all hostnames of your slave servers in the file # /var/yp/ypservers. NOPUSH=true # We do not put password entries with lower UIDs (the root and system # entries) in the NIS password database, for security. MINUID is the # lowest uid that will be included in the password maps. If you # create shadow maps, the UserID for

文档评论(0)

1亿VIP精品文档

相关文档