리눅스 NFS 설정

ITKHJ·2022년 10월 19일

Server

목록 보기
11/32
post-thumbnail

#####서버 설정#####

RPM 패키지 설치

nfs-utils-2.3.3-31.el8.x86_64.rpm
rpcbind-0.2.0-48.el7.x86_64
cloud-utils-growpart-0.29-3.el8.noarch.rpm - 용량 추가

NFS서버 서비스 가동 및 재부팅 시 활성화

systemctl start nfs-server
systemctl enable nfs-server

systemctl start rpcbind
systemctl enable rpcbind

NFS 서비스 등록

firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service nfs-server

NFS 서버 설정(/etc/exports)

home/nfsadm/cbtes_nfs (rw,all_squash,sync)
과(옵션)은 꼭 붙어 있어야함

#####클라이언트 설정#####

RPM 패키지 설치

nfs-utils-2.3.3-31.el8.x86_64.rpm
rpcbind-0.2.0-48.el7.x86_64

nfs-utils 실행

systemctl start nfs-utils
systemctl enable nfs-utils
systemctl status nfs-utils

systemctl start rpcbind
systemctl enable rpcbind
systemctl status rpcbind

nfs 서버의 export 지점 확인

showmount -e 172.16.100.132

클라이언트에 마운트할 디렉토리 생성

cbtes_was 서버의 /cbtes_nfs 생성
mkdir /cbtes_nfs

nfs 서버의 디렉토리 CBTES 운영 서버에 마운트하는 명령어

mount -t nfs -o sync 172.16.100.132:/home/nfsadm/cbtes_nfs /cbtes_nfs
(마운트할 서버) (클라이언트의 마운트할 경로)

클라이언트 서버의 fstab 등록

vi /etc/fstab
172.16.100.132:/home/nfsadm/cbtes_nfs /cbtes_nfs nfs sync 0 0

profile
모든 업무 지식 작성하자!

0개의 댓글