autofs 和 NFS

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 

 

测试:

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章