Lets begin:
- % su
- # echo 'nfs_server_enable="YES"' >> /etc/rc.conf
- # echo 'rpcbind_enable="YES"' >> /etc/rc.conf
- # echo 'mountd_flags="-r"' >> /etc/rc.conf
- # echo 'rpc_lockd_enable="YES"' >> /etc/rc.conf
- # echo 'rpc_statd_enable="YES"' >> /etc/rc.conf
Lets proceed by identifying what we want to share:
- % su
- # vi /etc/exports
- add the following line:
/usr/ports/distfiles -network 192.168.1 -mask 255.255.255.0Step 3 shares the /usr/ports/distfiles directory and make it available to any client with an IP address beginning in 192.168.1 and netmask of 255.255.255.0.
Now that we've enabled the NFS server settings and configured the exports file, lets start the server by:
- % su
- # rpcbind
- # nfsd -u -t -n 4
- # mountd -r
- % su
- # /etc/rc.d/mountd onereload
- % su
- # showmount -e
For more detailed documentation take a look into:
http://www.freebsd.org/doc/en/books/handbook/network-nfs.html
http://nfs.sourceforge.net/nfs-howto/index.html
4 comments:
this is a perfect howto, it all worked like charm! Thank you very much, you are a true geek!
Kolaloka
Hi,
I'm glad it proved useful.
I try to write the howtos as best as possible because in the future it will be using them. Blame it on my weak memory) ;-)
Regards.
Great! it works fine for me..
thank you very much
Marcel from Switzerland
Thanks for the feedback Marcel ;-)
Post a Comment