我是用了smbclient和mount.rifs不行,找的另一种方法
1.寄主机配置
首先在我们的寄主机上要把相应的文件夹开启共享功能选中相应文件夹右击->属性->共享->选择添加everyone
2.虚拟机配置
需要修改虚拟机的配置用共享文件夹的功能
选中相应虚拟机:设置-选项-共享文件夹-添加寄主机里面的共享文件夹路径
3.执行命令
[root@localhost ~]# vmware-hgfsclient
share
这个share就是我在寄主机上共享文件夹,在我们Linux的/mnt/hgfs目录下就有了,直接用里面的包
[root@apache ~]# cd /mnt/hgfs/
[root@apache hgfs]# ls
share
[root@apache hgfs]#
如果是只要里面文件夹里面的压缩包软件包的话到这步差不多了,该解压解压该移动移动不用下面的步骤
4.配置yum仓库,安装镜像文件
这里是要用到镜像源,所以配置yum仓库
创建挂载点
[root@localhost ~]# mkdir /sharefile
[root@localhost sharefile]# vmhgfs-fuse .host:/share /sharefile
(我在网上查到的是这样的vmhgfs-fuse .host:/ sharefile)
即可挂载好了
[root@localhost ~]#cd /etc/yum.repo.d/
[root@localhost yum.repo.d]#mkdir bak
[root@localhost yum.repo.d]#mv Cen* bak
[root@localhost yum.repo.d]# vim /etc/yum.repos.d/GFS.repo
[gfs]
name=gfsrepository
baseurl=file:///sharefile/gfsrepo
enabled=1
gpgcheck=0
yum安装相应软件即可
[root@localhost ~]#yum list
[root@localhost ~]#yum -y install glusterfs glusterfs-server glusterfs-fuse glusterfs-rdma