Setting up NFS + autofs under CentOS 4


Packages needed : nfs-utils

Server side

Edit /etc/exports : /home *(rw,sync)

Start service and make sure it’ll start at boot service nfs start chkconfig nfs on

Client side

Check if you can reach the server : rpcinfo -p

Manually mounting the shared folder mount -t nfs /home

Setting up autofs on the client side to automount the NFS share :

Package needed : autofs

Let’s say we have a user “admin”

Edit /etc/auto.master : /home /etc/auto.misc --timeout 60

Edit /etc/auto.misc : admin -rw,soft,rsize=8192,wsize=8192 server:/home/admin

Start the service : service autofs start

It should mount the NFS share.

Check the status : service autofs status

Thanks for reading this post!

Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!