반응형
1. nfs 를 구성할 서버에 아래 명령어 수행
# 1. nfs-kernel-server 설치
$ apt install nfs-kernel-server
# 2. nfs 폴더 생성 경로는 마음대로 가능
$ mkdir -p /mnt/nfs/share
# 3. 권한 설정
$ chown nobody:nogroup /mnt/nfs/share
$ chmod 755 /mnt/nfs/share
# 4. 설정 구성
$ vi /etc/exports
nfs폴더경로 마운트할IP대역(rw,sync,no_subtree_check)
## 예시
/mnt/nfs/share 192.1.1.0/24(rw,sync,no_subtree_check)
# 5. 적용
$ exportfs -a
$ systemctl restart nfs-kernel-server
2. nfs 를 사용할 서버에 아래 명령어 수행
# 1. nfs-common 설치
$ apt install nfs-common
# 2. 마운트할 폴더 생성 마음대로 생성 가능
$ mkdir -p /mnt/nfs/share
# 3. 마운트 수행
$ mount -t nfs 192.1.1.1:/mnt/nfs/share /mnt/nfs/share
해당 폴더에 임시로 파일 생성하면 공유할 수 있는 것을 확인 가능하다.
root@192.168.1.1:/mnt/nfs/share# ls
test
root@192.168.1.2:/mnt/nfs/share# ls
test
반응형
'Develop > 기타 작업' 카테고리의 다른 글
buildah push (이미지 save or export) (0) | 2025.03.18 |
---|---|
git repository release notify (Git저장소 릴리즈 알림) (0) | 2025.03.17 |
helm chart harbor upload (0) | 2025.03.05 |
ctr import 응답 없음 및 이미지 import 실패 (0) | 2024.10.29 |
buildah multiarch build 및 docker hub push (0) | 2024.07.03 |