#安装autofs #检查yum
[root@localhost ~]# yum -y install autofs
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
file:///media/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /media/repodata/repomd.xml"
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package autofs.x86_64 1:5.0.7-56.el7 will be installed
--> Processing Dependency: libhesiod.so.0()(64bit) for package: 1:autofs-5.0.7-56.el7.x86_64
--> Running transaction check
---> Package hesiod.x86_64 0:3.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
Package Arch Version Repository Size


#创建配置文件夹share
vim /etc/auto.master.d/XXX.autofs
[root@localhost mnt]# vim /etc/auto.master.d/nfs.autofs
#写入
/share /etc/auto.XXX

 

#配置pub
#创建文件夹
vim /etc/auto.XXX
[root@localhost mnt]# vim /etc/auto.nfs
#写入
pub 192.168.10.10:/opt/nfs_yin

 

#重启服务
[root@localhost auto.master.d]# systemctl restart autofs


#进入共享文件夹
[root@localhost mnt]# cd /share
[root@localhost share]# cd pub

posted on 2022-12-14 13:06  BCYDY  阅读(4)  评论(0)    收藏  举报