개발환경/ubuntu
ubuntu 12.04 NFS 설정
chipmaker
2013. 6. 9. 23:26
1. 패키지 설치
$ sudo apt-get install nfs-common nfs-kernel-server portmap
2. 환경 설정
# /etc/exports
/[directory] [Access IP adress](option)
e.g.
/home 192.168.0.11(rw,sync,no_root_squash,no_subtree_check)
* Options
rw: read-write
no_root_squash: set server and client to be same
/[directory] [Access IP adress](option)
e.g.
/home 192.168.0.11(rw,sync,no_root_squash,no_subtree_check)
It says 'I would like to share /home folder with 192.168.0.11'
* Options
rw: read-write
no_root_squash: set server and client to be same
3. Restart server
$ sudo /etc/init.d/nfs-kernel-server restart
$ sudo /etc/init.d/portmap restart
$ sudo /etc/init.d/portmap restart
4. 기타
1) Make directory used for NFS in client
2) Edit /etc/fstab in client
$ sudo mkdir /export
$ sudo mkdir /export/test
$ sudo chmod 777 /export
$ sudo chmod 777 /export/test
2) Edit /etc/fstab in client
# /etc/fstab
[IP address]:/home /export/test
e.g.
192.168.0.11:/home /export/test nfs rsize=8192,wsize=8192,timeo=14,intr