您的位置:首页 > 运维架构 > Linux

Red Hat Enterprise Linux 4 in VMware learning tips

2010-05-08 12:44 453 查看
Red Hat Enterprise Linux 4, RHEL4

VMware® Workstation
7.0.0 build-203739

如何增大虚拟机的硬盘容量:在虚拟机的属性里,点击"Add", 在弹出框中选择"Hard Disk",然后N个下一步即可。

如何在Host和Guest VM之间share文件:

在VM属性里的Options tab里,选择share Folders,enable it, then 设置一个host盘符或指定目录为share目录。

如何安装VMware tools in Guest VM:VMware->Menu->Create VMware tools, 然后你会在Red Hat的桌面上看到一个光盘logo,然后你能在vmware的屏幕下方看到一个help提示框,点击"help"button,就能打开一个本地自带的帮助webpage,按webpage上的步骤安装即可,安装方法如下:

tips:Linux会自动把光盘内容mount到如下目录/media/cdrecorder,可以在这个目录看到光盘的内容。

mount/unmount:

在unix/linux中,系统将设备当成文件处理,这是和uix的设计背景有关,而linux是仿unix的系统,因此和unix很像。mount cd-rom 实际上是mount你的cdrom中的光盘,它将光盘上的目录和文件挂在linux的一个目录下,然后通过对这个目录的访问来访问光盘上的文件。这样做的好处是当你访问一个文件时,只需知道他在linux目录中的位置,而不需要知道他的物理位置。在windows下c:,d:,a:都是物理位置,而在linux下/root可能在一块硬盘上/home可能在另一块硬盘上,/xxx可能在软驱或光驱上。当你要取出光盘时,要先卸载(umount),就是从linux的文件系统中去掉光盘的目录。否则拿出光盘后,再访问光盘上的东西就会出错。

http://baike.baidu.com/view/1374830.htm?fr=ala0_1

http://www.oklink.net/dnsj/czxt/linux/linuxadmin/node46.html

http://blog.csdn.net/nhczp/archive/2007/08/14/1742643.aspx

当一个文件系统不需要再mount着,可以用umount . umount 加一个参数unmount它,参数可以是设备文件或安装点。例如,要unmount上面例子中的目录,可以用:

$ umount /dev/hda2
$ umount /usr
$

普通用户与超级用户:$,#
[root@localhost ~]#
[test@localhost ~]$
普通用户可以在其权限许可的范围内使用系统资源,而超级用户(用户名为root)不仅可以使用系统中的所有资源而且可以管理系统资源。

所以为了按如下步骤操作,可以先把自动mount的cdrom进行umount操作,这里看清楚了,是u加mount,不是un。

[root@localhost ~]#unount /dev/cdrom

Install VMware Tools in a Linux Guest
Before you begin, make sure the virtual machine is powered on and the guest operating system is running.
To install VMware Tools in a Linux guest

1
On the host, select VM > Install VMware Tools.
If an earlier version of VMware Tools is installed, the menu item is Update VMware Tools. If the current version is installed, the menu item is Reinstall VMware Tools.

2
On the guest, log in as root.
3
If your Linux distribution does not automatically mount CD-ROMs, mount the VMware Tools virtual CD-ROM image.
a
If necessary, create the /mnt/cdrom directory:
mkdir /mnt/cdrom

b
Mount the CD-ROM drive.
Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a CD-ROM is not /mnt/cdrom, modify the command to reflect the conventions used by your distribution.
mount /dev/cdrom /mnt/cdrom

4
Change to a working directory (for example, /tmp):
cd /tmp

5
If a previous installation exists, delete the previous vmware-tools-distrib directory.
The location of this directory depends on where you placed it during the previous installation. Often it is placed in /tmp/vmware-tools-distrib.

6
Uncompress the installer:
tar zxpf /mnt/cdrom/VMwareTools-<x.x.x>-<yyyy>.tar.gz
The value <x.x.x> is the product version number and <yyyy> is the build number of the product release.

7
If necessary, unmount the CD-ROM image.
If your Linux distribution automatically mounted the CD-ROM, you do not need to unmount the image.
umount /dev/cdrom

8
Run the VMware Tools installer.
cd vmware-tools-distrib
./vmware-install.pl
Respond to the questions the command-line wizard displays on the screen. Press Enter to accept the default value. The configuration file, vmware-config-tools.pl, runs after the installer file finishes running.

9
If you are updating VMware Tools, reboot the virtual machine or manually reload the pvscsi, vmxnet, and vmxnet3 Linux kernel modules.
If you reload the modules, networking on the virtual machine is interrupted.

10
Enter the following commands to restore the network:
/etc/init.d/network stop
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

11
Log out of the root account.
exit

12
(Optional) Start your graphical environment.
13
In an X terminal, to start the VMware User process, enter the following command:
vmware-user
To change the default VMware Tools configuration options, see Open the VMware Tools Control Panel.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: