服务端安装

  1. 安装软件包

    yum -y install rpcbind nfs-utils

  2. 准备一个共享目录

    mkdir /share

  3. 编辑配置文件/etc/exports
    # 共享路径	客户端地址/允许谁共享	权限(rw-读写,ro-只读,sync-同步,no_root_squash-客户端使用root登入具有root权限)
    /share 192.168.83.0/24(rw,sync,no_root_squash)
    			
  4. 开启服务

    systemctl start rpcbind

    systemctl start nfs-server

  5. 查看启用的共享

    showmount -e localhost

  6. 客户端服务器配置

  7. 安装软件包

    yum -y install rpcbind nfs-utils

  8. 开启服务

    systemctl start rpcbind

    systemctl start nfs-server

  9. 查看服务端提供的共享

    showmount -e [服务端IP]

  10. 准备一个挂载目录并进行挂载

    mkdir /abc

    mount [服务端IP]:/share /abc

  11. 将挂载持久化,编辑/etc/fstab

    [服务端IP]:/share /abc nfs defaults 0 0