Fedora9 NFS配置

来源:互联网 发布:洛奇英雄传多核优化 编辑:程序博客网 时间:2024/04/28 17:37

Fedora9 NFS配置 

1 首先配置共享目录
  vim /etc/exports  (首次打开是空的文件)
编辑如下
   localhost:/media/datedisk/rootfs/rootfs_qtopia_qt4 *(rw,sync,no_root_squash)
其中  localhost:/media/datedisk/rootfs/rootfs_qtopia_qt4是共享目录,需要自己建立
     *(rw,sync,no_root_squash) 这个是权限设置,*表示所有客户机都可以挂在到本机上,
                                               rw表示具有读写权限
                                               no_root_squash表示挂在机具有root权限

2 启动nfs服务
  启动nfs需要关闭防火墙,输入setup,选择firewall 关闭之。
  输入 /etc/init.d/nfs start 可以启动nfs。
  输入serviceconf 启动图形界面,找到nfs,点击enable
  nfs启动失败的话可能是:

  (1).安装并启动rpcbind服务

  (2).selinux 冲突

       关闭

#vi  /etc/selinux/config

将文件中的SELINUX="" 为 disabled ,然后重启。

3 验证启动成功
   mount -t nfs localhost:/media/datedisk/rootfs/rootfs_qtopia_qt4 /mnt/nfs/

  如果没有出现错误,那么/mnt/nfs下的内容和共享目录是一样的


0 0
原创粉丝点击