Test 환경 :
Server - Ubuntu
...
18.04
...
Client - CentOS 7
Table of Contents |
---|
Server
NFS Package 설치
Code Block | ||
---|---|---|
| ||
apt-get update apt-get install nfs-common nfs-kernel-server rpcbind |
공유할 디렉토리 생성
Code Block | ||
---|---|---|
| ||
mkdir -p /home/share/jira chmod 755 /home/share/jira chown -R twoseed:twoseed /home/share/jira |
/etc/exports 파일에 추가
vi /etc/exports
Code Block | ||
---|---|---|
| ||
/home/share/jira 192.168.0***.***.124.*(rw,sync,no_root_squash,no_all_squash) # [/경로] [허용할 IP주소. *은 모두 허용](옵션) |
Note |
---|
|
Expand | |||||
---|---|---|---|---|---|
| |||||
|
NFS 서버 재시작
Code Block | ||
---|---|---|
| ||
service nfs-kernel-server restart service rpcbind restart |
Client
NFS Package 설치
Code Block | ||
---|---|---|
| ||
apt-get update apt-get install nfs-common |
공유할 디렉토리 생성
Code Block | ||
---|---|---|
| ||
mkdir -p /data/jira chmod 755 /data/jira chown -R twoseed:twoseed /data/jira |
NFS 공유 폴더 마운트
Code Block | ||
---|---|---|
| ||
mount -t nfs 192.168.0.2***.***.100.150:/home/share/jira /data/jira |
Client 서버 재시작시 자동 마운트 설정
vi /etc/exportsfstab
Code Block | ||
---|---|---|
| ||
192.168.0.2***.***.100.150:/home/share/jira /data/jira nfs defaults 0 0 |