数据管理与分析-安装NFS-Server

时间:2023-11-01 16:18:11

安装NFS-Server

  1. 安装nfs
    yum install -y nfs-common nfs-utils
  2. 创建数据目录
    # mkdir -p /data/nfs
  3. 访问授权

    添加nfs-server访问白名单及文件存储路径

    # vim /etc/exports/data/nfs 192.168.0.0/24(no_root_squash,rw,sync,no_subtree_check)

    如果允许所有访问,用/data/nfs *(no_root_squash,rw,sync,no_subtree_check)

  4. 加载配置
    # exportfs -rv
  5. 启动NFS和rpcbind
    # systemctl enable nfs && systemctl enable rpcbind && systemctl start rpcbind nfs
    图1 启动NFS和rpcbind1
    图2 启动NFS和rpcbind2
  6. 查看 RPC 服务的注册状况
    # rpcinfo -p 192.168.0.69
    图3 查看 RPC 服务的注册状况
  7. showmount测试
    # showmount -e 192.168.0.69
    图4 showmount测试
support.huaweicloud.com/deepexidip-dma/deepexidip_57.html