依然饭跑跑 发表于 2015-4-10 08:57:37

linux命令行下安装VM TOOLS

以ROOT帐户登录LINUX,VM菜单:VM--安装VMware Tools,打开终端:
注意:在linux的各种命令行下输入"命令"或"软件名"一定要注意大小写!!!

# cd /mnt/cdrom
# cd /cdrom
# ls   VMwareTools-5.5.1-19175.rpm VMwareTools-5.5.1-19175.tar.gz
# rpm -ivh VMwareTools-5.5.1-19175.i386.rpm
# cp VMwareTools-5.5.1-19175.tar.gz /tmp
# cd /tmp
# tar zxpf VMwareTools-5.5.1-19175.tar.gz
# cd vmware-tools-distrib
# ./vmware-install.pl
Creating a new installer database using the tar3 format.
Installing the content of the package.
# 安装过程的画面,全部使用默认值,一直按 Enter 就对了
In which directory do you want to install the binary files?

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

What is the directory that contains the init scripts?

In which directory do you want to install the daemon files?

In which directory do you want to install the library files?

Thepath "/usr/lib/vmware-tools" does not exist currently. This programisgoingto create it, including needed parent directories. Is thiswhatyou want?

In which directory do you want to install the documentation files?

Thepath "/usr/share/doc/vmware-tools" does not exist currently.Thisprogram isgoing to create it, including needed parent directories.Isthis what you want?

The installation of VMware Tools 5.5.1 build-19175 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?

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ 确定 ]
Trying to find a suitable vmhgfs module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.
pcnet32 30153 0
Unloading pcnet32 module
Trying to find a suitable vmxnet module for your running kernel.
The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.

Detected X.org version 6.8.
关闭控制台鼠标服务: [ 确定 ]
启动控制台鼠标服务: [ 确定 ]
Enjoy,
--the VMware team
# shutdown -r now
# 修改完成之后,重新启动计算机,让 VMware Tools 生效
  
  
  再接下来设置共享就是在VM里设置了,VM→Setting→Options→SharedFolders→Add→选定要共享的文件夹并给这个文件夹命名→OK,vmware会把这个文件夹自动mount到/mnt/hgfs目录下,OK搞定收工!
  
  
  关于这个问题,偶有一点小发现,如下:
  1.这个共享与windows的server服务开否没有关系,也就是说与我们常见的windows与windows共享是不同的。
  2.共享与内置防火墙允许共享这个有关。我开了内置防火墙,也就是在本地连接那里设置启用了共享这一项,否则会有什么后果,有待我具体确定,刚才就是我把这个没搞hgfs里面什么也没有,内置防火墙允许共享这项之后我重启了一次linux,现在有了,HOHO!
  3.现在是两个文件夹拖文件的时候,可以从windows拖到Linux系统,但是把文件从linux拖到windows的时候显示错误提示:目标位置没有足够的空间。NND!我在VM里设置了可写,设置了windows目录可写权限,赋给everyone所有权限,赋给vmware user也是所有权限,依然出现这样的问题,很是郁闷。最后我试着在/mnt/hgfs共享出来的文件夹里可以新建文件夹,那就表明可以写啊,有戏。然后我用cp命令把linux的东东拷到windows目录去了,yeah!这可能是一个Bug吧,cp可以,拖动复制就报错,我靠!
  4.在终端里对汉字的支持,还是不太好,windows的文件带有汉字的在linux里显示的。。。。。。。。。乱78糟,所以如果想把linux的东东CP到windows里最好取名的时候不带汉字。另外比如LINUX下带汉字的记事本(内容有汉字)cp到windows用记事本打开的话,格式是没办法了,LINUX下的换行在windows里都用一个黑框代替了,这样子可以用写字板看就会恢复原来的格式,可是汉字呢,惨了!两者要是都能恢复就好了。。。。。。。。。:)

  5.这个共享暂时用用,以后换换Samba或者FTP玩玩:)
  
  
  转载:http://hi.baidu.com/w_dalu/blog/item/09c374c397aa3653b219a8fd.html
页: [1]
查看完整版本: linux命令行下安装VM TOOLS