Linux虚拟机中安装VMware Tools

Linux虚拟机中安装VMware Tools

环境:VMware Player、Fedora 16

预先安装:Fedora系统中必须先安装perl、make、gcc、kernel headers of the running kernel。

步骤:

1.VMware Player菜单上选择Virtual Machine >Install VMware Tools。

2.虚拟机中以root身份登入,打开终端

3.运行mount命令(不带任何参数),确定系统是否自动挂载VMware Tools virtual CD-ROM image

1 mount                      <==显示系统挂载情况

   3.1如果系统没有自动挂载CD-ROM ,手动输入命令进行挂载:

1 mkdir /media/VMware Tools
2 mount /dev/cdrom  /media/VMware Tools

     注:有些Linux系统挂载点为/mnt/cdrom,可以用ls命令查询该目录是否存在。

4.进入/tmp目录进行操作,列出挂载点目录内容

1 cd /tmp
2 ls /media/VMware Tools

5.解压缩VMware Tools软件包(小技巧:文件名过长,可以用【Tab】键自动补全)

1 tar zxpf /media/VMware Tools/VMwareTools-8.8.1-528969.tar.gz

6.如有必要,卸载CD -ROM(由于本系统自动挂载设备的,所以不需要卸载)

1 umount /dev/cdrom

7.安装软件

1 cd vmware-tools-distrib
2 ./vmware-install.pl

8.一直按回车键,保留默认设置,安装成功。

------------------------------可能需要的步骤--------------------------------------------------

如果没有预先安装好make、gcc、kernel headers of the running kernel等软件,则会提示你:

复制代码
Before you can compile modules, you need to have the following installed...  
 
make
gcc
kernel headers of the running kernel
复制代码
Searching for GCC...
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes] yes
What is the location of the gcc program on your machine? 

9.打开另一个终端,切换root身份,安装gcc

1 yum -y install gcc

在What is the location of the gcc program on your machine?后边输入/usr/bin/gcc,然后回车

10.根据提示,选择内核3.1.0-7.fc16.i686 kernel(或使用命令 'uname -r '查询内核版本)

复制代码
Searching for a valid kernel header path...
The path "" is not a valid path to the 3.1.0-7.fc16.i686 kernel headers.
Would you like to change it? [yes] yes      

Enter the path to the kernel header files for the 3.1.0-7.fc16.i686 kernel?
复制代码

内核头文件C header files下载地址:
http://rpmfind.net/linux/rpm2html/search.php?query=kernel-devel%20
找到对应内核头文件rpm包下载,即 kernel-devel-3.1.0-7.fc16.i686.rpm,安装:

1 rpm -ivh kernel-devel-3.1.0-7.fc16.i686.rpm

在Enter the path to the kernel header files for the 3.1.0-7.fc16.i686 kernel?这一行后输入/usr/src/kernels/3.1.0-7.fc16.i686/include,回车。安装成功!

------------------------------可能需要的步骤--------------------------------------------------

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值