ITPub博客

首页 > Linux操作系统 > Linux操作系统 > centos nfs(六)

centos nfs(六)

原创 Linux操作系统 作者:wisdomone1 时间:2010-04-16 11:30:57 0 删除 编辑
    西游记中唐僧师徒也是历经多难,最终才得以达成正果,修练成佛。同样,我们的centos nfs之学习系列,也要继续。前几节相关的链接请查看如下:
centos nfs学习系列
   
   本节继续讲述nfs基于命令行模式,如何在nfs server端导出共享的文件系统用于共享

Command Line Configuration
If you prefer editing configuration files using a text editor or if you do not have the X Window
System installed, you can modify the configuration file directly.
   如果你通常习惯使用命令行方式工作,或者暂时没有x窗口的环境,可以直接修改/etc/exports来实现相关功能

The /etc/exports file controls what directories the NFS server exports. Its format is as follows:
directoryhostname(options)
  /etc/exports位于nfs server端,这个文件包括导出的用于共享的目录,它的格式如下:
The only option that needs to be specified is one of sync or async (sync is recommended). If
sync is specified, the server does not reply to requests before the changes made by the request
are written to the disk.
      这个文件唯一要指定的选项是同步或异步(推荐同步)。如果指定为同步,nfs server必须要nfs 请求所涉及的操作变化数据写入到磁盘中之后,
才会对nfs 请求进行响应或者处理



---下列举了几个小例子
For example,
/misc/export speedy.example.com(sync)  ---允许来自speedy.example.com主机(nfs client)的用户可以以同步方式加载导出的目录
would allow users from speedy.example.com to mount /misc/export with the default

read-only permissions, but,
/misc/export speedy.example.com(rw,sync)
---注:/etc/exports的内容格式分为两列:
                                      a, 要共享的目录
                                      b, 允许使用共享目录的nfs client主机名及选项,主机名与选项之间没有空格;
                                         而且选项必须以()包括起来,可以包含多个选项,选项之间以,分隔






Each time you change /etc/exports, you must inform. the NFS daemon of the change, or
reload the configuration file with the following command:
/sbin/service nfs reload

    每次修改了/etc/exports,必须要让nfs进程知道。或者通过service nfs reload重载来实现

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-659907/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: centos nfs(五)
下一篇: centos nfs(七)
请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170