NFS 是什么?
( 墙内: http://mikixiyou.iteye.com/blog/1506366)
1 、在NFS 服务端的服务器上配置
以root
身份登陆Linux
服务器,编辑/etc
目录下的共享目录配置文件exports
,指定共享目录及权限等。
执行如下命令编辑文件/etc/exports
:
# vi /etc/exports
在该文件里添加如下内容:
/test 192.168.65.*(rw,no_root_squash,async)
然后保存退出。
括号内的参数意义描述如下:
rw
:读/
写权限,只读权限的参数为ro
;
sync
:数据同步写入内存和硬盘,也可以使用async
,此时数据会先暂存于内存中,而不立即写入硬盘。
no_root_squash
:NFS
服务器共享目录用户的属性,如果用户是
root
,那么对于这个共享目录来说就具有
root
的权限。
2 、在NFS 服务器上启动服务
启动端口映射:
# /etc/rc.d/init.d/portmap start
启动NFS
服务,此时NFS
会激活守护进程,然后就开始监听客户端的请求:
# /etc/rc.d/init.d/nfs start
3
、在NFS
客户端的服务器上配置
这里192.168.65.210 是服务端服务器,相当于源服务器
mount -t nfs 192.168.65.210:/test -o hard,rw,noac,rsize=32768,wsize=32768,suid,proto=tcp,vers=3 /test