Step 1 – To mount an NFS share on a Linux system first you’ll need to install the NFS utils package.
yum install nfs-utils
Step 2 – Create local directory as a mount point for mounting the remote NFS file system
mkdir /repolist
Step 3 – Manually mount the NFS Share with mount command
Syntax for the command:
mount -t nfs -o options host:/remote/export /local/directory
- options is a comma-delimited list of mount options.
- host is the host name, IP address, or fully qualified domain name of the NFS server exporting the file system to be mounted.
- /remote/export is the file system or directory being exported from the server, i.e, directory to be mounted.
- /local/directory is the client location where /remote/export is mounted.
Step 4 – To verify that NFS share has been mounted by running the mount command and filter nfs mounts.
Step 5 – Update file system table (/etc/fstab)
To persist the changes across system reboots, Configure NFS mounting on /etc/fstab.
vi /etc/fstab
The NFS share will be auto mount on next reboot 🙂