分类: LINUX
2009-12-23 15:52:33
配置/etc/exports
在文件的最后添加如下一句话:
/home/share 192.168.1.*(rw,sync,no_root_squash) //”*(”之间没有空格
对ip在192.168.1.*范围的ip,共享/home/share目录内容,且有读,写权限, 并且该用户进入/home/share目录后的身份为root。
更改了/etc/exports, 运行 #exportfs -r 更新
执行如下命令,启动端口映射:#/etc/rc.d/init.d/portmap start
运行#/etc/init.d/nfs restart 重启nfs服务
测试NFS:
可以尝试一下挂载本地磁盘(假设本地主机IP地址为:192.168.1.10, 将/home/share挂载到/mnt)
#mount -t nfs 192.168.1.10:/home/share /mnt
运行#df 看看结果
运行 #showmount -e 查看NFS server的export list。