Solaris - NFS Configuration

Server Side

##### Share to all clients #####
shell> chmod 707 /[sharing directory]
shell> share -F nfs -o rw /[sharing directory]
shell> /usr/lib/nfs/nfsd -a 16
shell> /usr/lib/nfs/mountd


##### Share to specified hosts #####
shell> vi /etc/hosts
192.168.0.2 HOST01
192.168.0.3 HOST02
shell> vi /etc/dfs/dfstab
share -F nfs -o rw=HOST01:HOST02 /[sharing directory]
shell> vi /etc/dfs/dfstab
share -F nfs -o rw=HOST01:HOST02 /[sharing directory]
shell> mv /etc/rc3.d/K28nfs.server /etc/rc3.d/S28nfs.server
shell> /etc/init.d/nfs.server start
shell> /etc/init.d/nfs.server stop


Client Side

##### Manual-mount #####
shell> vi /etc/hosts
192.168.0.1 SERVERHOST
shell> mkdir /usr/data
shell> mount -F nfs SERVERHOST:/[sharing directory] /usr/data


##### Auto-mount #####
shell> vi /etc/hosts
192.168.0.1 SERVERHOST
shell> vi /etc/vfstab
SERVERHOST:/[sharing directory] - /usr/data nfs - yes rw,bg,soft
shell> mount all

Comments