返回首页
当前位置: 主页 > 其他教程 > 电脑教程 >

VMware虚拟机:Linux下正确安装VMware tools

时间:2014-06-13 10:24来源:Office教程学习网 www.office68.com编辑:麦田守望者

使用VMware安装Linux(ISO)

1.New Virtual Machine-》Typical-》Linux-》选择要安装的驱动器-》Use bridge networking-》Finish
2.选中,右键-》Setting-》DVD/CD-ROM-》Connection-》Use ISO Image-》选择ISO文件-》Power On开始安装,当提示要插入第二张CD时,选择菜单Setting-》Configuration Editor选择第二个ISO文件……第三个ISO同上。
3.如果我们按照正常的Linux安装步骤配置显卡、显示器,是没有办法启动X-Windows的,必须先安装VMware tools软件包。

安装 VMware tools步骤:

在VMware的安装路径下有三个ISO文件:windows.iso、freebsd.iso以及linux.iso,如果您已经安装了WinISO等可以打开ISO文件的软件,这时双击ISO文件,你就会发现里面包含了不同的安装软件,现在我们先进行Linux下的VMware tools安装。
1、以Root身份进入Linux。
如果不是Root身份(终端命令窗口最后一个字符是#就是root身份),在终端命令提示符里输入sudo su-回车,再输入密码,密码不会显示任何字符,即进入root身份。
2、按下 CTRL+ALT组合键,进入主操作系统,点击VMWARE状态栏安装提示,或者点击 SETTING菜单下的ENABLE VMWARE TOOLS子菜单。
这时,VMware会把linux.iso输入光驱,如果不是,可手动载入linux.iso文件。
3、确认安装VMware tools。
这时我们并没有真正的安装上了VMWARE TOOLS软件包,如果您点击菜单:DEVICES,您就会发现光驱的菜单文字变为:ide1:0-> C:\Program Files\VMware\VMware Workstation\Programs\linux.iso,这表示VMWARE将LINUX的ISO映象文件作为了虚拟机的光盘
4、鼠标点击Linux界面,进入Linux。
5、运行如下命令,注意大小写。(注意,不同版本的VMware的Linux.iso文件不同)
  mount -t iso9660 /dev/cdrom /mnt
  加载CDROM设备,这时如果进入 /mnt 目录下,你将会发现多了一个文件:vmware-linux-tools.tar.gz。这就是WMWARE TOOLS的LINUX软件包,也就是我们刚才使用WINISO打开LINUX.ISO文件所看到的。
  cp /mnt/vmware-linux-tools.tar.gz /tmp
  将该软件包拷贝到LINUX的 TMP目录下。
  umount /dev/cdrom
  卸载CDROM。
  cd /tmp
  进入TMP目录
  tar zxf vmware-linux-tools.tar.gz
  解压缩该软件包,默认解压到vmware-linux-tools目录下(与文件名同名)。
  cd vmware-linux-tools
  进入解压后的目录
  ./vmware-install.pl
  运行安装命令。
这时install提示你是否需要备份以前的配置文件,建议选择“y”。
等待INSTALL运行完成后,这时键入 START 命令,是不是可以看到漂亮的LINUX图形界面了?

如果你安装的是图形界面的linux,比如很多desktop产品,安装方式有一点不同,很多中间步骤可以省略了,用root身份进入linux,解压安装包,进入解压目录,运行安装文件./vmware-install.pl,后面的操作按回车键使用默认设置,对初级用户建议直接按回车键, 图形界面的终端操作命令参考如下:(本人解压到pootor/VMTools下面的,命令用黑体表示,默认选顶用按回车键)

pootor@pootor-linux:~$ sudo su -
Password:
root@pootor-linux:~# cd ‘/home/pootor/VMTools/vmware-tools-distrib’
root@pootor-linux:/home/pootor/VMTools/vmware-tools-distrib# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.  This may take from several minutes to over an hour
depending upon its size.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

The path “/usr/lib/vmware-tools” does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

The path “/usr/share/doc/vmware-tools” does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes] yes

The installation of VMware Tools 6.0.0 build-45731 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: “/usr/bin/vmware-uninstall-tools.pl”.

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: “/usr/bin/vmware-config-tools.pl”. Do you want
this program to invoke the command for you now? [yes] yes

Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
Trying to find a suitable vmmemctl module for your running kernel.

None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel.  Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes] yes

Using compiler “/usr/bin/gcc”. Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.20-14-generic/build/include]

Extracting the sources of the vmmemctl module.

Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only’
make -C /lib/modules/2.6.20-14-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-14-generic’
  CC [M]  /tmp/vmware-config0/vmmemctl-only/os.o
  SHIPPED /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
  LD [M]  /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /tmp/vmware-config0/vmmemctl-only/.vmmemctl1.o.cmd for /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
  CC      /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
  LD [M]  /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-14-generic’
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only’
The module loads perfectly in the running kernel.

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmhgfs-only’
make -C /lib/modules/2.6.20-14-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-14-generic’
  CC [M]  /tmp/vmware-config0/vmhgfs-only/backdoor.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/bdhandler.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/dbllnklst.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/dentry.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/dir.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/eventManager.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/file.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/filesystem.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/fsutil.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/inode.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/link.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/message.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/module.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/page.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/request.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/rpcin.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/rpcout.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/staticEscape.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/stubs.o
  CC [M]  /tmp/vmware-config0/vmhgfs-only/super.o
  LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/vmware-config0/vmhgfs-only/vmhgfs.mod.o
  LD [M]  /tmp/vmware-config0/vmhgfs-only/vmhgfs.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-14-generic’
cp -f vmhgfs.ko ./../vmhgfs.o
make: Leaving directory `/tmp/vmware-config0/vmhgfs-only’
The module loads perfectly in the running kernel.

pcnet32                34052  0
Unloading pcnet32 module

------分隔线----------------------------
标签(Tag):Android Ubuntu Linux Unix fedora debian
------分隔线----------------------------
推荐内容
猜你感兴趣