IT/LINUX

Centos NFS 설정 세팅 하기

ssung85 2020. 10. 13. 23:59
728x90

================NFS 서버========================

#rpm -qa |grep nfs-utils

# yum install nfs-utils

#vi /etc/exports 수정

※ 공유 옵션

        ro  =>  읽기 권한만 부여

        rw  =>  읽기 쓰기 권한 부여

        root_squash  => 클라이언트에서 root를 서버상의 nobody 계정으로 매핑

        no_root_squash  => 클라이언트 및 서버 모두 root 계정 사용       

       ex)  ]# vi /etc/exports

            /home/share    클라이언트IP(rw)

                 =>/home/share 192.168.100.0/24(rw,no_root_squash,sync)

 

#service rpcbind start

# service nfs start

공유 현황 확인 가능

 #showmount -e [서버IP]

 

================클라이언트======================

 

Mount 할때 에러 나올 경우

mount: wrong fs type, bad option, bad superblock on…..

 

마운트 하는 클라이언트 서버에도 nfs-utils 필요 하다

#yum install nfs-utils -y

 

설치 완료 mount

mount -t nfs [서버IP]:/[경로] /[마운트경로]

Ex)

mount -t nfs 192.168.100.100:/home/test /mnt/

728x90