Set Up the NFS Server

Follow these steps to install and configure the NFS server on AlmaLinux or Ubuntu:

  1. Run the following commands to install the NFS server.
    AlmaLinux
    dnf install nfs-utils
    mkdir -p /mnt/nfs_share
    chown nobody:nobody /mnt/nfs_share
    chmod 777 -R /mnt/nfs_share/
    Ubuntu
    sudo apt install nfs-kernel-server
    mkdir -p /mnt/nfs_share
    chown nobody:nobody /mnt/nfs_share
    chmod 777 -R /mnt/nfs_share/
  2. Configure the NFS exports.
    /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)
  3. Restart the NFS server:
    systemctl restart nfs-server
  4. Verify the NFS server status:
    systemctl status nfs-server