반응형
# yum install nfs-utils
# systemctl enable nfs-server.service
# systemctl start nfs-server.service
# systemctl status nfs
# firewall-cmd --permanent --zone=public --add-service=nfs
# firewall-cmd --permanent --zone=public --add-service=rpc-bind
# firewall-cmd --permanent --zone=public --add-service=mountd
# firewall-cmd --reload
---------------------------------------------------------------------
----------------------
NFS Server Installl
----------------------
# yum install nfs-utils
# systemctl enable rpcbind
# systemctl enable nfs-server
# systemctl enable nfs-lock
# systemctl enable nfs-idmap
# systemctl start rpcbind
# systemctl start nfs-server
# systemctl start nfs-lock
# systemctl start nfs-idmap
# mkdir /raid
# chmod -R 755 /raid
# chown nfsnobody:nfsnobody /raid
# vi /etc/exports
# /raid 192.168.1.230(rw,sync,no_root_squash,no_all_squash)
# systemctl restart nfs-server
방화벽 설정
# firewall-cmd --permanent --zone=public --add-service=nfs
# firewall-cmd --permanent --zone=public --add-service=mountd
# firewall-cmd --permanent --zone=public --add-service=rpc-bind
# firewall-cmd --reload
NFS확인
# exportfs
/raid 192.168.1.230
----------------------
NFS Client Installl
----------------------
# yum install nfs-utils
# mkdir -p /mnt/raid
# mount -t nfs 192.168.1.200:/raid /mnt/raid
# df -h
# vi /etc/fstab
192.168.1.200:/raid /mnt/raid nfs defaults 0 0
NFS마운트 디렉토리를 삼바연결시
chcon -t samba_share_t /디렉토리 이거 안됨
nfs_t권한으로 samba_share_t로 변경이 안됨
이럴땐
------------------------------------------
# setsebool -P samba_share_nfs 1
------------------------------------------
마운트된 NFS 리스트 보기
# mount | grep nfs
클라이언트에서 서버마운트 리스트 뷰
[root@lab nfs]# showmount -e 192.168.0.190
Export list for 192.168.0.190:
/mnt/raid5 192.168.0.200
'Linux > Samba&NFS' 카테고리의 다른 글
CentOS SELinux 동일한 디렉토리 http,samba 사용허가방법 (0) | 2021.01.24 |
---|---|
samba mount (0) | 2020.09.27 |
삼바공유폴더에 실행파일을 복사했을때 실행권한(rw-)이 없을때 (0) | 2018.06.04 |
Samba SELinux 권한설정 (0) | 2018.03.28 |
samba 기본설치 방법 (0) | 2016.07.18 |