autofs 和 NFS
1.autofs:
在客戶端上實現自動掛載的軟件
安裝:
# dnf install autofs.x86_64 -y 安裝autofs
配置方式:
# vim /etc/auto.master
# vim /etc/auto.samba 生成子策略文件
# systemctl restart autofs.service 重啓服務
# vim /etc/autofs.conf 編輯配置文件
測試:
cd /mnt/samba
2. nfs
1.NFS基本信息
nfs-utils 安裝包
nfs-server 服務腳本
/etc/exports 共享配置文件
2.nfs的啓用
# systemctl enable --now nfs-server
# firewall-cmd --permanent --add-service=rpc-bind
# firewall-cmd --permanent --add-service=mountd
# firewall-cmd --permanent --add-service=nfs
# firewall-cmd --reload
測試:
# showmount -e 192.168.1.35
3.nfs配置
# vim /etc/exports
# exportfs -rv 生效
測試:
# mount 192.168.1.35:/westosdir /mnt
3.nfs+autofs
安裝
# dnf install autofs.x86_64 -y
# vim /etc/auto.master 編輯autofs配置文件
# vim /etc/auto.nfs 生成子策略文件
# systemctl restart autofs.service
測試: