zoukankan      html  css  js  c++  java
  • linux 服务器挂在目录

    linux nfs 文件共享

    一、安装nfs

    #rpm –q nfs-utils portmap

    二、关闭nfs和rpcbind

      /etc/init.d/nfs stop

      /etc/init.d/rpcbind stop

     三、启动nfs

      /etc/init.d/rpcbind start

      /etc/init.d/nfs start

    四、nfs服务端设置接收文件(分享目录)目录

      #vi /etc/exports

       /home/test     *(rw,no_root_squash)

      rw:读写权限

      no_root_squash:登入 NFS 主机使用分享目录的使用者,如果是 root 的话,那么对于这个分享的目录来说,他就具有 root 的权限!这个项目『极不安全』,不建议使用! 
      root_squash:在登入 NFS 主机使用分享之目录的使用者如果是 root 时,那么这个使用者的权限将被压缩成为匿名使用者,通常他的 UID 与 GID 都会变成 nobody 那个系统账号的身份。

          使exportfs生效

       # exportfs -rv

    五、客户端设置

      #mount -t nfs hostname、IP:/home/test /home/text

    六、设置系统启动自动挂载

      vi /etc/fstab

      IP:/home/test /ebs/test nfs defaults 0 0

      开机自动启动nfs

      在 /etc/profile文件中添加如下信息

      etc/init.d/nfs start

    七、查看nfs状态

      #service portmap status

    八、服务端设置

      重新输出共享目录exportfs –rv

      停止输出所有目录exportfs –auv

      输出(启用)所有目录exportfs av

  • 相关阅读:
    html 一号店静态页面
    多线程
    TCP通信
    MySQL连接查询
    Mysql数据库 DDL 数据定义语言
    MySQL数据库 DML 数据操作语言
    java字符流
    java File类
    java变量
    JDK、JRE、JVM的关系
  • 原文地址:https://www.cnblogs.com/danwuxinbolg/p/9540732.html
Copyright © 2011-2022 走看看