Linux NFS 설정

Linux 2015. 7. 13. 17:28

123서버에서 124서버로 공유해주는 경우

1. 공유해 주는 서버(123.123.123.123)
#vi /etc/exports

/home/session/ 123.123.123.124(rw,sync,no_root_squash)    #공유할폴더. 접근허용서버(권한)


#service nfs start


에러날 경우 rpcbind 실행중인지 확인


#rpcinfo -p

rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refused

nfs-utils 설치


#yum install nfs-utils




portmap 시작

#chkconfig portmap on

#service portmap start


portmap 이 없다면

#yum -y install portmap





rpcinfo를 다시 확인해 보자


#rpcinfo -p

program vers proto port

100000 2 tcp 111 portmapper

100000 2 udp 111 portmapper


정상가동중이므로 nfs를 시작한다.



#service nfs start

Starting NFS services: [ OK ]

Starting NFS quotas: [ OK ]

Starting NFS daemon: [ OK ]

Starting NFS mountd: [ OK ]


시작서비스에 등록

#chkconfig nfs on












2. 받는 서버에서 마운트(123.123.123.124)

#mkdir /home/session123 (폴더가 안 만들어져 있는 경우)
#mount -t nfs 123.123.123.123:/home/session/ /home/session123

블로그 이미지

엘로드넷

,