insecure 允许从这台机器过来的非授权访问。
例如可以编辑/etc/exports为:
以下是代码片段:
/tmp *(rw,no_root_squash)
/home/public 192.168.0.*(rw) *(ro)
/home/test192.168.0.100(rw)
/home/linux *.the9.com(rw,all_squash,anonuid=40,anongid=40)
以下是代码片段:
/etc/rc.d/init.d/portmap start (在REDHAT中PORTMAP是默认启动的)
/etc/rc.d/init.d/nfs start
exportfs命令:
如果我们在启动
Linux NFS服务器之后又修改了/etc/exports,是不是还要重新启动nfs呢?这个时候我们就可以用exportfs命令来使改动立刻生效,该命令格式如下:exportfs [-aruv]
以下是代码片段:
-a :全部mount或者unmount /etc/exports中的内容
-r :重新mount /etc/exports中分享出来的目录
-u :umount 目录
-v :在 export 的?r候,将详细的信息输出到屏幕上。
以下是代码片段:
[root @test root]# exportfs -rv <==全部重新 export 一次!
exporting 192.168.0.100:/home/test
exporting 192.168.0.*:/home/public
exporting *.the9.com:/home/linux
exporting *:/home/public
exporting *:/tmp
reexporting 192.168.0.100:/home/test to kernel
exportfs -au <==全部都卸载了。
东方瑞通IT培训与服务中心拥有十年IT培训经验,专注中国高端IT培训是中国高端IT培训第一品牌,提供全线的IT培训课程,东方瑞通为广大学员提供全面、细致、专业的线上、线下服务,致力于为客户提升良好的职业竞争力
http://www.easthome.com