Set Up the NFS Server
Follow these steps to install and configure the NFS server on AlmaLinux or Ubuntu:
- Run the following commands to install the NFS server.
- AlmaLinux
-
CODE
dnf install nfs-utils mkdir -p /mnt/nfs_share chown nobody:nobody /mnt/nfs_share chmod 777 -R /mnt/nfs_share/ - Ubuntu
-
CODE
sudo apt install nfs-kernel-server mkdir -p /mnt/nfs_share chown nobody:nobody /mnt/nfs_share chmod 777 -R /mnt/nfs_share/
- Configure the NFS exports.
CODE
/mnt/nfs_share 10.0.203.0/24(rw,sync,no_subtree_check,no_root_squash) /mnt/nfs_share 10.0.202.0/24(rw,sync,no_subtree_check,no_root_squash) - Restart the NFS server:
CODE
systemctl restart nfs-server - Verify the NFS server status:
CODE
systemctl status nfs-server