日期:2014-05-16  浏览次数:20747 次

Linux下NFS服务器的配置



类型:System V-launched Service
软件包:nfs-utils
进程:nfsd,lockd,rpciod,rpc.{mounted,rquotad,statd}
脚本:nfs,nfslock
端口:由portmap服务指派端口(111)
配置文件:/etc/exports
辅助工具:portmap(必须)
相关命令:rpcinfo -p [IPADD]:查看服务器提供的rpc服务
? ?? ?? ? showmount -e:查看服务共享的目录
Server端:
1./etc/exports格式:
? ?? ?? ?? ?目录? ?? ?? ?? ?? ?? ?? ?选项? ?? ?? ?? ?
例:共享/share目录给192.168.0.x的用户
? ?? ?? ???/share? ?? ?? ?? ?? ? 192.168.0.0/24 (rw)??
2.启动portmap服务:? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?
? ? service portmap start[restart]? ?? ?? ?? ?? ?? ?? ?
3.启动NFS服务:
? ? service nfs start[restart] ? ?? ?? ?? ?? ?? ?? ?? ?
Client端
1.启动portmap服务:? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?
? ? service portmap start[restart]? ?? ?? ?? ?? ?? ?? ?
2.挂载服务器端的共享目录(假设服务器端192.168.0.1):? ?
? ? mount -t nfs 192.168.0.1:/share??/mnt/localshare?