zoukankan      html  css  js  c++  java
  • NFS服务

    NFS实现文件共享

    NFS没有固定端口所有需要rpcbind来进行客户机与服务器之间的通信

    rpcbind端口TCP、UDP111端口

    搭建方法:

    服务端:

    yum -y install nfs-utils rpcbind
    systemctl start rpcbind
    systemctl enable rpcbind
    mkdir /www/
    cat /etc/exports
    /www    192.168.80.0/24(rw)
    rw:读写
    ro:只读
    sync:同步写入
    async:异步写入
    no_root_squash:当客户机以root身份访问时赋予本地root的权限(默认是root_squash,将作为nfsnobody用户降权对待)
    all_squash:所有用户都降权
    anonuid:降权为普通用户的UID
    anongid:降权为普通用户的GID
    允许使用通配符:? *
    systemctl start nfs
    systemctl enable nfs

    客户端:

    yum install rpcbind nfs-utils
     showmount -e 服务端IP
    mount 服务端IP:/www /mnt/
    echo "服务端IP:/www    /mnt        nfs4   defaults,_netdev    0 0" >>  /etc/fstab
    umount -a
    mount -a 
    df -hT     如果还在挂载说明挂载已经成功
  • 相关阅读:
    Python 模块,数据类型,元组
    Python条件循环判断
    Python简介
    File对象的基本操作学习
    File对象的基本操作学习
    sublime学习心得
    sublime学习心得
    IO学习
    IO学习
    Emacs学习
  • 原文地址:https://www.cnblogs.com/bnre/p/14362766.html
Copyright © 2011-2022 走看看