CentOS 9.x Configure basic NFSv4 server for sharing folders between two machines

From Notes_Wiki

Home > CentOS > CentOS 9.x > CentOS 9.x file sharing > CentOS 9.x NFS > CentOS 9.x Configure basic NFSv4 server for sharing folders between two machines

There is older article on this at CentOS 7.x Configure basic NFSv4 server for sharing folders between two machines

To configure CentOS 9.x based NFS server use:

  1. Disable SELinux by editing '/etc/sysconfig/selinux' and setting:
    SELINUX=disabled
    Also run
    setenforce 0
    grubby --update-kernel ALL --args selinux=0
  2. Based on requirement consider disabling firewall using:
    systemctl stop firewalld
    systemctl disable firewalld
  3. Install nfs-utils package
    dnf -y install nfs-utils
  4. Edit /etc/exports to export desired folder such as /home in below example:
    /home *(rw,no_root_squash,crossmnt)
  5. Start and enable server
    systemctl start nfs-server
    systemctl enable nfs-server
  6. Validate nfs exports from current server using:
    showmount -e
    exportfs -a -v



Home > CentOS > CentOS 9.x > CentOS 9.x file sharing > CentOS 9.x NFS > CentOS 9.x Configure basic NFSv4 server for sharing folders between two machines