SOURCECODEBD.NET

Live Experience

NFS Server 

Build NFS Server to share any directories. 
 
  
[1] Configuration on the system you want to build NFS server
  
root@master:~# aptitude -y install nfs-kernel-server portmap 
root@master:~# vi /etc/exports 
 
# write like below *note
/home 10.0.0.0/24(rw,sync,no_root_squash,no_subtree_check)
 
# *note
/home => shared directory
10.0.0.0/24 => range of networks NFS permits accesses
rw => possible to read and write
sync => synchronize
no_root_squash => enable root privilege
no_subtree_check => enable users' authority
 
root@master:~# service portmap restart 
root@master:~# /etc/init.d/nfs-kernel-server restart 
root@master:~# update-rc.d portmap defaults 19 
update-rc.d: warning: /etc/init.d/portmap missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 
# it's no ploblem above. it may be bugs
 
 
[2] Configuration on NFS clients
  
root@www05:~# aptitude -y install nfs-common portmap 
root@www05:~# mount -t nfs master.sourcecodebd.net:/home /home 
root@www05:~# df -h 
 
(home directory on NFS is mounted)
 
root@www05:~# vi /etc/fstab 
 
# add at the bottom: change home directory this server mounts to the one on NFS
 
master.sourcecodebd.net:/home /home nfs defaults 0 1
You are here: Home / Ubuntu / NFS Server on Ubuntu