Installing VMWARE server on CentOS 5 or Red hat enterprise Linux 64 bit version

本文提供了一份详细的指南,介绍如何在64位Linux服务器上安装VMware Server,包括解决依赖问题的方法,以及配置网络和编译内核模块的具体步骤。

VMware virtualization software is an excllent choice for x86-compatible computers. They have both commercial and free version. I received few email regarding VMWARE on 64 bit Linux. Installing VMWARE server on CentOS 5 or Red hat enterprise Linux 64 bit version is a tricky business. In this small howto I will explain vmware installation on 64 bit Linux server without facing any dependencies problem.

Following instructions are tested on both RHEL 5 and CentOS 5 running 64 bit Intel / AMD hardware and software. My kernel:
$ uname -mrs
Output:

Linux 2.6.18-8.1.6.el5 x86_64

My RHEL 5 release (same kernel for CentOS):
$ cat /etc/redhat-release
Output:

Red Hat Enterprise Linux Server release 5 (Tikanga)

Make sure you have following software installed:

  • Full gcc compiler and development environment
  • Kernel headers and devel packages for current kernel (i.e. kernel-headers and kernel-devel)

 

Step # 1: Download vmware server

You can download VMWARE server here. Use wget command to download:
$ wget http://download3...

Step # 2: Install vmware server

Once downloaded use RPM command to install vmware sever, enter:
# rpm -ivh VMware-server-1.0.3-44356.i386.rpm
Output:

Preparing...                ########################################### [100%]
   1:VMware-server          ########################################### [100%]

Step # 3:Install required files / libraries

You need to install following development package / files on server:

  1. libXtst-devel : X.Org X11 libXtst development package
  2. libXrender-devel : X.Org X11 libXrender development package

Simply use yum command to install packages:
# yum install libXtst-devel libXrender-devel kernel-devel
Output:

Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
rhel-x86_64-server-vt-5   100% |=========================| 1.2 kB    00:00
rhel-x86_64-server-5      100% |=========================| 1.2 kB    00:00
Reading repository metadata in from local files
Parsing package install arguments
...........
....
...
Running Transaction
  Installing: libXtst                      ######################### [1/8]
  Installing: libXau-devel                 ######################### [2/8]
  Installing: xorg-x11-proto-devel         ######################### [3/8]
  Installing: libX11-devel                 ######################### [4/8]
  Installing: libXdmcp-devel               ######################### [5/8]
  Installing: libXtst-devel                ######################### [6/8]
  Installing: libXtst-devel                ######################### [7/8]
  Installing: mesa-libGL-devel             ######################### [8/8] 

Installed: libXtst-devel.x86_64 0:1.0.1-3.1 libXtst-devel.i386 0:1.0.1-3.1
Dependency Installed: libX11-devel.x86_64 0:1.0.3-8.0.1.el5 libXau-devel.x86_64 0:1.0.1-3.1 libXdmcp-devel.x86_64 0:1.0.1-2.1 libXtst.i386 0:1.0.1-3.1 mesa-libGL-devel.x86_64 0:6.5.1-7.2.el5 xorg-x11-proto-devel.x86_64 0:7.1-9.fc6
Complete!

Step # 4: Install xinetd

You need xinetd the extended Internet services daemon / service in order to use VMWARE console from remote computer. Use yum command to install xinetd:
# yum install xinetd

Step # 5: Configure VMWARE server

Use vmware-config.pl script to configure VMWARE networking and other aspects.
# vmware-config.pl
Output (make sure you setup VMWARE as per your requirments, following is just a sample output):

Making sure services for VMware Server are stopped.

Stopping VMware services:
   Virtual machine monitor                                 [  OK  ]

You must read and accept the End User License Agreement to continue.
Press enter to display it.
......
......
will provide you with a copy of our
distribution agreement for your signature.   

Do you accept? (yes/no)    yes

Thank you.

Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?
[/usr/share/icons] 

What directory contains your desktop menu entry files? These files have a
.desktop file extension. [/usr/share/applications]
In which directory do you want to install the application's icon?
[/usr/share/pixmaps] 

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel.  Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [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.18-8.1.6.el5/build/include] 

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.18-8.1.6.el5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-8.1.6.el5-x86_64'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/task.o
  CC [M]  /tmp/vmware-config0/vmmon-only/common/vmx86.o
  CC [M]  /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST
  CC      /tmp/vmware-config0/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.1.6.el5-x86_64'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.

Do you want networking for your virtual machines? (yes/no/help) [yes] 

Configuring a bridged network for vmnet0.

Your computer has multiple ethernet network interfaces available: eth0, eth1.
Which one do you want to bridge to vmnet0? [eth0] eth1

The following bridged networks have been defined:

. vmnet0 is bridged to eth1

Do you wish to configure another bridged network? (yes/no) [no] 

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes] no

Do you want to be able to use host-only networking in your virtual machines?
[no] 

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmnet-only'
make -C /lib/modules/2.6.18-8.1.6.el5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-8.1.6.el5-x86_64'
  CC [M]  /tmp/vmware-config0/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config0/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config0/vmnet-only/userif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/netif.o
  CC [M]  /tmp/vmware-config0/vmnet-only/bridge.o
  CC [M]  /tmp/vmware-config0/vmnet-only/procfs.o
  CC [M]  /tmp/vmware-config0/vmnet-only/smac_compat.o
  SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x86_64.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.o
  Building modules, stage 2.
  MODPOST
WARNING: could not find /tmp/vmware-config0/vmnet-only/.smac_linux.x86_64.o.cmd for /tmp/vmware-config0/vmnet-only/smac_linux.x86_64.o
  CC      /tmp/vmware-config0/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/vmware-config0/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-8.1.6.el5-x86_64'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
The module loads perfectly in the running kernel.

The default port : 902 is not free. We have selected a suitable alternative
port for VMware Server use. You may override this value now.
Remember to use this port when connecting to this server.
Please specify a port for remote console connections to use [904] 

WARNING: VMware Server has been configured to run on a port different from the
default port. Remember to use this port when connecting to this server.
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
Configuring the VMware VmPerl Scripting API.

Building the VMware VmPerl Scripting API.

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

Installing the VMware VmPerl Scripting API.

The installation of the VMware VmPerl Scripting API succeeded.

Generating SSL Server Certificate

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines] 

The path "/var/lib/vmware/Virtual Machines" does not exist currently. This
program is going to create it, including needed parent directories. Is this
what you want? [yes] 

Please enter your 20-character serial number.

Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel:  XYZZZ-XYZZZ-XYZZZ-ABC91

Starting VMware services:
   Virtual machine monitor                                 [  OK  ]
   Virtual ethernet                                        [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]

The configuration of VMware Server 1.0.3 build-44356 for Linux for this running
kernel completed successfully.

How do I manage my VMWARE server remotely?

You can now connect from local computer using vmware-server-console program to:

  • Configure VM Guest oses
  • Configure VM hardware
  • Install new VPS / VM guest oses such as FreeBSD, Windows or any other operating systems etc

$ vmware-server-console &
You need to enter host name ip:port, username and password to access vmware server.
vmware-server-console

See also:

Featured Articles:

<think>好的,我现在需要帮助用户解决在基于RPM的Linux发行版上安装软件的问题。用户提到了RedHat Enterprise LinuxCentOS、Fedora和openSUSE这些系统。首先,我应该回想一下这些系统常用的包管理工具。记得RPM是这些系统的包管理基础,主要工具包括Yum和DNF,还有zypper在openSUSE中使用。 接下来,我需要整理安装软件的几种方法。通常,用户可以通过官方仓库直接安装,这是最方便的方式。比如使用yum install或者dnf install命令。另外,有时候软件可能不在官方仓库里,这时候可能需要添加第三方仓库,比如EPEL或者RPM Fusion,这些仓库提供了额外的软件包。用户可能需要先安装epel-release或者启用RPM Fusion仓库,然后再用yum或dnf安装。 第三种情况是用户直接下载了RPM包,这时候可以用rpm -i命令来安装,但需要注意依赖问题。如果依赖较多,手动处理会很麻烦,所以可能的话还是建议通过仓库安装。 还有一种方法是使用第三方提供的自动安装脚本,比如像GitLab提供的脚本,不过要提醒用户注意安全,确保来源可信。 然后,我需要结合用户提供的引用内容。引用[2]提到可以通过Yum仓库安装RabbitMQ,引用[3]提到了使用Yum仓库安装GitLab的例子。这些可以作为具体例子来说明如何添加仓库并安装软件。 此外,用户可能想知道不同发行版之间的差异。例如,openSUSE使用zypper而不是yum/dnf,所以需要单独说明。同时,收费和免费版本在稳定性上的区别,如引用[4]提到的收费版更稳定,可能影响软件安装时的选择。 还需要注意一些常见问题,比如依赖解决、GPG密钥的导入,以及更新缓存的重要性。比如在添加新仓库后,需要运行yum makecache或者dnf makecache来更新元数据。 最后,生成相关问题时要覆盖用户可能进一步关心的方面,比如如何解决依赖、第三方仓库推荐、手动安装与仓库安装的优劣比较,以及特定发行版如openSUSE的注意事项。</think>在基于RPM的Linux发行版(如Red Hat Enterprise LinuxCentOS、Fedora、openSUSE)中安装软件主要有以下方法: ### 一、通过包管理器安装 1. **Yum/DNF(RHEL/CentOS/Fedora)** - 基础命令:`sudo yum install package_name`(CentOS 7及以下) 或`sudo dnf install package_name`(Fedora/CentOS 8+) 例如安装Erlang RPM包: ```bash sudo yum install erlang # 通过预设仓库安装[^2] ``` - 添加第三方仓库(如EPEL/RPM Fusion): ```bash sudo yum install epel-release # 安装EPEL仓库 sudo yum install package_name ``` 2. **Zypper(openSUSE)** ```bash sudo zypper refresh # 更新仓库元数据 sudo zypper install package_name ``` ### 二、直接安装RPM包 1. 下载RPM文件后安装: ```bash sudo rpm -ivh package.rpm # 安装单个包 ``` 2. 自动解决依赖(需配置仓库): ```bash sudo yum localinstall package.rpm # 自动处理依赖[^3] ``` ### 三、通过第三方仓库安装 - **示例:GitLab CE安装** ```bash curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce # 自动配置仓库并安装[^3] ``` ### 四、源码编译安装(较少用) 需安装编译工具链: ```bash sudo yum groupinstall "Development Tools" ./configure && make && sudo make install ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值