To mount and unmount NFS network file systems with the Automounter, you need to set up a NFS server.
Install the NFS client package:
# yum install -y nfs-utils
Start the rpcbind daemon:
# systemctl start rpcbind
Install the Automounter package:
# yum install -y autofs
Let’s assume that the /home/tools directory is exported by the nfsserver server.
If no working DNS, add an entry in the /etc/hosts file with the nfsserver name and its IP address.
Edit the /etc/auto.master file and, at the beginning, add the following line:
/- /etc/auto.tools
Create the /etc/auto.tools file and add the following line:
/home/tools -rw,soft,intr nfsserver.example.com:/home/tools
Start the Automounter daemon:
# systemctl start autofs
Test the configuration:
# cd /home/tools
Leave a Reply
You must be logged in to post a comment.