Software projects/OS/Slackware/Advanced usage/NFS
From Pandora Wiki
NFS
- NFS is the most impressive *NIX networked file server. Accessing a file over the network is as fast as you've had it on your local drive.
- The standard configuration is pretty simple.
- If you plan to use it on a bloated network, use tcp connections instead of udp.
- By default, NFS protocol IS NOT ENCRYPTED. It was designed for LAN. There are methods to use it over internet but i won't describe them here. SSHFS may also be considered instead.
Server side
- Let's say the IP adress of the server is 10.0.0.250, and the IP of the client is 10.0.0.5 .
- I already secured the default SL4P connections. To know how, just look /etc/hosts.deny .
- So you have to allow hosts or networks. Do do this, edit /etc/hosts.allow .
- Now you have to set up your exports. Edit /etc/exports . Be really careful here, because:
/home/lswat/videos 10.0.0.5(sync,ro)
will work, but
/home/lswat/videos 10.0.0.5 (sync,ro)
will not work. See the space ?
- And finally activate and run the port mapper:
chmod +x /etc/rc.d/rc.rpc /etc/rc.d/rc.rpc start
then the NFS server
chmod +x /etc/rc.d/rc.nfsd /etc/rc.d/rc.nfsd start
- Those changes are now permanent, so the NFS server will work at next restart.
Client side
- Create a mount point, ie.:
mkdir -p /mnt/nfs/video-killed-the-radio-star
- And mount:
mount 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star
You may have to specify the file system type:
mount -t nfs 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star