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:
- Disable SELinux by editing '/etc/sysconfig/selinux' and setting:
- SELINUX=disabled
- Also run
- setenforce 0
- grubby --update-kernel ALL --args selinux=0
- Based on requirement consider disabling firewall using:
- systemctl stop firewalld
- systemctl disable firewalld
- Install nfs-utils package
- dnf -y install nfs-utils
- Edit /etc/exports to export desired folder such as /home in below example:
-
- /home *(rw,no_root_squash,crossmnt)
-
- Start and enable server
- systemctl start nfs-server
- systemctl enable nfs-server
- 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