Centos7-Mini安装 VM Tools,配置共享文件夹

Centos7-Mini安装 VM Tools

1、安装依赖组件
$ yum -y install gcc gcc-c++ make
$ yum -y install kernel-devel
2、更新系统内核
$ yum update kernel -y
# 重启虚拟机更新内核
$ init 6  
3、安装VMTools
# 创建挂载目录
$ mkdir /mnt/cdrom
# 挂载目录(必须在root用户下才能执行成功)
$ mount /dev/cdrom /mnt/cdrom
# 将VMTools拷贝到家目录
$ cp /mnt/cdrom/VMwareTools-10.3.23-16594550.tar.gz ~
# 切换到家目录
$ cd ~
# 解压VMTools
$ tar -zxvf VMwareTools-10.3.23-16594550.tar.gz 
# 切换到解压后的vm-tools目录
$ cd vmware-tools-distrib
# 安装
# 安装过程中,回车使用默认值
$ ./vmware-install.pl
# 安装结束重启虚拟机
$ reboot
4、VMware配置共享文件夹
# VMware菜单栏:虚拟机 --> 设置 --> 选项 --> 共享文件夹 
VM --> setting --> options --> Shared Folders 

1.设置为 Always enabled
2.添加共享文件夹

# vmware-hgfsclient --help
# hgfsclient: lists any shared folders
# Linux查看共享文件夹
$ vmware-hgfsclient
5、安装过程问题处理(仅记录安装过程中遇到的问题)

open-vm-tools are available from the OS vendor and VMware recommends using
open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information.
Do you still want to proceed with this legacy installer? [no]

# 缺少 open-vm-tools
$ yum update -y
$ yum install -y open-vm-tools

Searching for a valid kernel header path…
The path “” is not a valid path to the 3.10.0-1160.66.1.el7.x86_64 kernel
headers.
Would you like to change it? [yes]

# 更新内核
$ yum update kernel -y
$ init 6  

Searching for GCC…
The path “” is not valid path to the gcc binary.
Would you like to change it? [yes]

# 缺少gcc编译器
$ yum -y install gcc gcc-c++ make

关于虚拟机内共享文件夹不显示问题

# 临时显示配置
$ sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other

# 永久显示配置
$ chmod +x /etc/rc.local
$ vi /etc/rc.local
$ cat << EOF >> /etc/rc.local
  sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other
  EOF

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LemonCoder呀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值