2009년 11월 12일 목요일

nfs 환경 설정

#apt-get install nfs-kernel-server
#vi /etc/exports
-exports파일에서 다음과 같이 수정.
<NFS 적용할 폴더>    localhost(rw,no_root_squash,no_all_squash)
<NFS 적용할 폴더>    Target IP(즉 보드 IP or 접근 허용 IP)(rw,no_root_squash,no_all_squash)

ex)
/nfs    localhost(rw,no_root_squash,no_all_squash)
/nfs    Target IP(즉 보드 IP or 접근 허용 IP)(rw,no_root_squash,no_all_squash)

#/etc/init.d/nfs-kernel-server restart
--nfs가 마운트 되는지 시험--
#mount -n localhost:<위 NFS에서 적용한 폴더 경로> <마운트 시킬 폴더 경로>

ex)
#mount -n localhost:/nfs /home/temp

위에서 마운트 되었다면 이상 없음.

NFS를 이용해 마운트 시키는 방법.
#mount -t nfs -o nolock 접근할 IP:<접근할 IP의 폴더 경로> <마운트 시킬 폴더 경로>

ex)
#mount -t nfs -o nolock 192.168.0.1:/nfs    /temp



댓글 없음:

댓글 쓰기