zoukankan      html  css  js  c++  java
  • nfs共享文件服务搭建

    网络文件共享服务器192.10.19.132
    yum install -y nfs-utils

    在exports文件中添加的从机范围
    vim /etc/exports
    /home/nfs/ 192.10.19.0/24(rw,sync,fsid=0)

    rw表示可读写;sync表示同步写,fsid=0表示将/data找个目录包装成根目录
    先为rpcbind和nfs做开机启动:(必须先启动rpcbind服务)
    systemctl enable rpcbind.service
    systemctl enable nfs-server.service
    然后分别启动rpcbind和nfs服务:
    systemctl start rpcbind.service
    systemctl start nfs-server.service

    exportfs -r
    #使配置生效

    exportfs
    #可以查看到已经ok
    /home/nfs 192.10.19.0/24


    192.10.19.136
    接着从机
    yum install -y nfs-utils

    先为rpcbind做开机启动:
    systemctl enable rpcbind.service
    然后启动rpcbind服务:
    systemctl start rpcbind.service
    注意:客户端不需要启动nfs服务

    检查 NFS 服务器端是否有目录共享:showmount -e nfs服务器的IP
    showmount -e 192.10.19.132

    cd /home/ && mkdir /nfs

    挂载
    mount -t nfs 192.10.19.132:/home/nfs /home/nfs

    查看
    df -h

  • 相关阅读:
    国庆·生日
    国足
    Eason's concert
    今天的斩获
    The 4400
    闷热
    24
    一直登录不了。。。原来是因为。。。
    黄色暴雨警告
    绝密飞行
  • 原文地址:https://www.cnblogs.com/Liang-jc/p/9391317.html
Copyright © 2011-2022 走看看