configuring nfs server and mounting it

ibm.com

NFS is one of the secure sharing system in linux. NFS is Network File System. It quite easy to setup, and more simple than samba.
/etc/hosts.allow
portmap: 192.168.1.2
lockd: 192.168.1.2
rquotad: 192.168.1.2
mountd: 192.168.1.2
statd: 192.168.1.2

Or just type ALL:localhost

/etc/hosts.deny
portmap: ALL
lockd: ALL
rquotad: ALL
mountd: ALL
statd: ALL

chmod a+x /etc/rc.d/rc.nfsd
/etc/rc.d/rc.nfsd start

nano /etc/exports
/mnt/sda1 192.168.1.2(rw,no_subtree_check,no_root_squash) 92.168.1.3(ro,no_subtree_check,no_root_squash)

$exportfs -r

$/etc/init.d/nfs-kernel-server start

to check

$exportfs -u

that’s in server

Then in client

Check the dependencies

$apt-get install nfs-common rpcbind
mount 192.168.1.1:/mnt/sda1 /home/me/computer1 -o nolock

That’s it.

Remember type the sudo command for ubuntu and derivative. It means all the command above must do in root privileged.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.