posted by 빠담아빠다 2016. 3. 10. 16:22

NFS(Network File System)

네트워크를 통해 파일을 공유할 수 있도록 만든 프로토콜

서버 세팅

yum또는 rpm으로 nfs 설치

# vi /etc/idmapd.conf

  추가 Domain = 도메인네임[server02.com]

# vi /etc/exports

추가 : 공유할폴더 공유대상ip (속성)

Ex) /home/test1 192.168.171.148(rw)

속성정리

ro 읽기전용

rw 읽기/쓰기 가능

root=n  n으로 표시된 계정의 uid를 루트권한으로 사용 가능하게 한다.

insecure  이 머신에서 인증 받지 않은 엑세스를 허용한다.

# exportfs

# /etc/rc.d/init.d/nfs restart

Iptables 와 selinux 확인 해줘라 nis와 동일하게

# service rpcbind restart

# service nfslock restart

# service nfs restart

# chkconfig rpcbinc on

# chkconfig nfslock on

# chkconfig nfs on

클라이언트세팅

yum또는 rpm으로 nfs 설치

# vi /etc/idmapd.conf

 추가 Domain=도메인네임[server02.com]

Service rpcbind restart

# service rpcbind restart

# service nfslock restart

# service netfs restart

# chkconfig rpcbinc on

# chkconfig nfslock on

# chkconfig netfs on

# mount –t nfs 192.168.171.145:/home/server02 /home/server02

마운트 명령어 서버ip:/서버가공유한폴더 /마운트할 폴더

부팅시 자동 마운트 하기.

 

NFS 클라이언트에 /etc/fstab 파일에 한줄 추가한다.

서버ip or 도메인:/디렉토리     /내디렉토리     속성    defaults        0 0

dog:/hyi                /hyi                    nfs     defaults        0 0

 

'OS > Linux' 카테고리의 다른 글

[linux] How to SSH  (0) 2016.03.10
[linux] how to RSH  (0) 2016.03.10
[NIS] 환경구성 정리  (0) 2016.03.10
[OpenMPI] OpenMPI설치  (1) 2016.03.10
[Linux] 기초  (0) 2016.03.10