#NFS-server
systemctl stop firewalld
systemctl disable firewalld
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
init 6
#nfs 패키지 설치 및 자동실행 활성화
yum -y install nfs-utils
systemctl start nfs-server
systemctl enable nfs-server
#mount할 디렉터리 생성 및 연결 허가 대역 설정
mkdir /shared
vi /etc/exports
/shared 192.168.102.*(rw)
/shared 192.168.3.*(rw)
exportfs -r
#현재 서버에 설정된 nfs 확인
showmount -e localhost
#NFS-client
#방화벽과 sellinux 비활성화
systemctl stop firewalld
systemctl disable firewalld
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
init 6
#nfs 패키지 설치
yum -y install nfs-utils
#NFS-server 확인
showmount -e 192.168.102.204
#마운트 디렉터리 생성 및 마운트
mkdir /remote
mount -t nfs 192.168.102.204:/shared /remote
#재시작 해도 자동 마운트 하도록 설정
vi /etc/fstab
192.168.102.204:/shared /remote nfs defaults 0 0
#마운트 확인
df -h