Chinaunix首页 | 论坛 | 博客
  • 博客访问: 117936
  • 博文数量: 30
  • 博客积分: 2520
  • 博客等级: 少校
  • 技术积分: 395
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-10 10:31
文章分类
文章存档

2009年(7)

2008年(23)

我的朋友

分类: LINUX

2009-03-11 20:31:00

今天花了一天时间终于把vm-tools装好了,但期间也遇到过很多问题,特此写下和大家分享:
1,安装GCC开发工具
# Install software called by by VMware Tools
yum install gcc
2,安装内核文件
# Install kernel header files
yum install kernel-devel
3.检查内核文件的版本是否匹配,如果不匹配需要进行升级
# Check it matches the running kernel
uname -r             # running kernel
rpm -q kernel-devel  # installed kernel headers
4,第3不中如果不匹配,则需要升级内核文件,升级完后,重新启动系统
# It the two versions do not match, run
yum -y upgrade kernel kernel-devel
# then reboot (but only if they did not match).
5,查找内核文件的位置,安装VMware-tool工具时候需要(我装的时候,会自动查找到,不需要手工指定)
# Find out where the kernel headers are
ls -d /usr/src/kernels/$(uname -r)*/include
# You may need this later.
6,下载虚拟机工具安装包,即:VMware-tool安装包,并解压(具体就是在虚拟机工具栏上,点击"VM"->"Install VMware Tools",会出现安装包,选择*.gz的文件,解压到一个目录下就可以)
以下是命令行中具体实现方法,我是在图形界面下实现的
# If you already have VMwareTools-5.5.2-29772.tar.gz
on disk, SKIP THIS STEP!
# Download VMware-workstation-5.5.2-29772.tar.gz from vmware.com
# Extract the VMware Tools iso from it
tar --strip-components=3 -zxvf VMware-workstation-5.5.2-29772.tar.gz \
vmware-distrib/lib/isoimages/linux.iso
# Create a temporary mount point
mkdir /mnt/vmtools-temp
# Mount the image
mount -o loop linux.iso /mnt/vmtools-temp
# Copy VMware Tools from the mount
cp /mnt/vmtools-temp/VMwareTools-5.5.2-29772.tar.gz /tmp/
# Unmount the image and tidy up
umount /mnt/vmtools-temp
rmdir /mnt/vmtools-temp
rm linux.iso
# Unpack VMware Tools to a temporary directory
cd /tmp/
tar zxvf VMwareTools-5.5.2-29772.tar.gz
7.进入解压目标目录,执行以下代码,一路回车按下来
cd /tmp/vmware-tools-distrib/
./vmware-install.pl
8.直到该步骤,拷贝粘贴第5步的路径,然后一直按回车,直到选择屏幕分辨率。
What is the location of the directory of C header files that match your running
kernel? [/usr/src/kernels/2.6.18-1.2849.fc6-i686/include]
提示信息显示hgfs模块安装有问题,没关系,下一篇文章中解决。
9.到了该步骤,问你是否改变X-window的设置,选y,就可以改变分辨率。
Do you want to change your guest X resolution? (yes/no) [no] y
Please choose one of the following display sizes (1 - 13):
[1] "640x480"
[2]< "800x600"
[3] "1024x768"
[4] "1152x864"
[5] "1280x800"
[6] "1152x900"
[7] "1280x1024"
[8] "1376x1032"
[9] "1400x1050"
[10] "1680x1050"
[11] "1600x1200"
[12] "1920x1200"
[13] "2364x1773"
Please enter a number between 1 and 13:
[3]
还不行呢,再跟着下边的走吧!
虽然,我们选择了分辨率,但不要高兴太早,这个时候我们应该修改/etc/X11/xorg.conf文件才能生效
我的xorg.conf文件内容如下:
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "vmmouse"
Option "Protocol" "Auto"
Option "Device" "/dev/input/mouse0"
EndSection
Section "ServerFlags"
Option "NoAutoAddDevices"
EndSection
Section "Monitor"
### Comment all HorizSync and VertSync values to use DDC:
### Comment all HorizSync and VertSync values to use DDC:
Identifier "vmware"
ModelName "LCD Panel 1280*1024"
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 31.5 - 67.0
VertRefresh 50.0 - 75.0
Option "dpms"
EndSection
Section "Device"
Identifier "VMware SVGA"
Driver "vmware"
EndSection
Section "Screen"
# Don't specify DefaultColorDepth unless you know what you're
# doing. It will override the driver's preferences which can
# cause the X server not to run if the host doesn't support the
# depth.
Identifier "Screen0"
Device "VMware SVGA"
Monitor "vmware"
DefaultDepth 24
SubSection "Display"
# VGA mode: better left untouched
Viewport 0 0
Depth 4
Modes "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1024x768"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
Modes "1024x768"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1024x768"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
 
这个时候我们重启就可以修改分辨率了。。。。
 
在这过程中我还遇到了其他一些问题
1、注意vmware的版本 最开始我使用的是5.5.1安装就一直出问题  后来改为5.5.3就好了
我的配置是 fc6 2.6.18内核 +vm 5.5.3
2、就是第3步  我们但前运行的kernel版本和内核文件版本一定要保持一致
3、在第8步时 可能系统会提示version版本不对 我们应该修改/usr/src/kernerls/2.6.18-1.2798.fc6-i686/include/linux/version.h文件加上
#define UTS_RELEASE "2.6.18-1.2798.fc6" 
阅读(2117) | 评论(0) | 转发(0) |
0

上一篇:软件开发各类文档模板

下一篇:没有了

给主人留下些什么吧!~~