« HOWTO: Setup apt-cacher, caching service for installation packagesHOWTO Setup and Configure Autofs »

HOWTO:Set up NFS sharing

21/07/08

HOWTO:Set up NFS sharing

The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine as if it were a local disk. It allows for fast, seamless sharing of files across a network.

I stopped using NFS for remote file systems. When I got autofs working. See my HOWTO set up Autofs.

...

Install The Necessary Software

Installing the software
sudo apt-get install nfs-kernel-server nfs-common portmap

When configuring portmap do not bind loopback. If you do you can either edit /etc/default/portmap by hand or run:

Configuring the basics

sudo dpkg-reconfigure portmap  


sudo /etc/init.d/portmap restart 

The /etc/exports file is used for creating a share on the NFS server

sudo gedit /etc/exports

Add some exports (shares) (allow IP 192.168.0.(0-255) )

Example

/data 192.168.0.0/255.255.255.0(rw,no_subtree_check,sync)  


/home 192.168.0.0/255.255.255.0(rw,no_subtree_check,sync) 

These lines export the directories /data and /home from the local host a limited range of IP addresses and hostnames with read/write access. See man exports for more details. After making your edits save and restart the NFS daemon.

sudo /etc/init.d/nfs-kernel-server restart  
sudo exportfs -ra

The Official HOWTO is very good you should read it. :p


Pages: 1· 2

No feedback yet