首先我想說vmware 在linux下安裝真TM坑爹..
吐槽結束,然後看看我如何搞定它..
1.去官網https://my.vmware.com/group/vmware/evalcenter?p=server20下載vmware server 2編譯安裝包,需注冊才能下載.
2.修改vmware安裝內核,由於vmware server 2 默認適配的是2.6.18版本linux內核,高版本內核均無法編譯安裝成功,centos6.3內核為2.6.32,此處在網上尋找資料耗費N長時間....最後終於找到(# 後面的為需要輸入的命令)
# tar xzf VMware-server-2.0.2-203138.x86_64.tar.gz
Download patch ( Patch provided by: Ramon de Carvalho Valle ):
# wget http://linuxconfig.org/images/files/vmw ... tch.tar.gz
Decompress patch:
# tar xzf vmware-ubuntu-10.04.patch.tar.gz
First, we apply a patch to all modules:
# cd vmware-server-distrib/lib/modules/source/
# for f in *.tar ; do tar pxf $f ; done
# cd ~/vmware-server-distrib/
# patch -p1 < ~/vmware-server2.patch
patching file lib/modules/source/vmci-only/include/pgtbl.h
patching file lib/modules/source/vmnet-only/vnetUserListener.c
patching file lib/modules/source/vmci-only/Makefile
patching file lib/modules/source/vmmon-only/common/vmx86.c
patching file lib/modules/source/vmmon-only/include/compat_cred.h
patching file lib/modules/source/vmmon-only/include/x86svm.h
patching file lib/modules/source/vmmon-only/linux/driver.c
patching file lib/modules/source/vmmon-only/linux/hostif.c
patching file lib/modules/source/vmmon-only/Makefile
patching file lib/modules/source/vmnet-only/Makefile
patching file lib/modules/source/vmnet-only/netif.c
patching file lib/modules/source/vsock-only/Makefile
gzip all modules:
# cd ~/vmware-server-distrib/lib/modules/source/
# for f in vmci vmmon vmnet vsock ; do tar pcf $f.tar $f-only ; done
# rm -fr *-only
Apply patch to vmware-config.pl:
# cd
# patch vmware-server-distrib/bin/vmware-config.pl vmware-config.patch
patching file vmware-server-distrib/bin/vmware-config.pl
3. Step 3: Install VMware-server
At this stage everything is ready for VMware-server installation.When you will be during the vmware-server installation asked:
"Would you like to specify a different administrator?"
answer YES and enter your username. Otherwise root will by and administrator of you VMware-server installation.
# cd ~/vmware-server-distrib/
# ./vmware-install.pl
安裝完成後開始配置VMware
運行 “/usr/bin/vmware-config.pl
Making sure services for VMware Server are stopped.
Stopping VMware autostart virtual machines:
Virtual machines[失敗]
Stopping VMware management services:
VMware Virtual Infrastructure Web Access
VMware Server Host Agent[失敗]
Stopping VMware services:
VMware Authentication Daemon[確定]
Virtual machine monitor[確定]
You must read and accept the End User License Agreement to continue.
Press enter to display it.
閱讀許可協議
Do you accept? (yes/no) y
你是否接受
The bld-2.6.18-8.el5-i686smp-RHEL5 – vmmon module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 – vmci module loads perfectly into the
running kernel.
The bld-2.6.18-8.el5-i686smp-RHEL5 – vsock module loads perfectly into the
running kernel.
Do you want networking for your virtual machines? (yes/no/help) [yes]
直接回車好了 默認就是yes
Configuring a bridged network for vmnet0.
Please specify a name for this network.
[Bridged]
選擇網絡接口名稱 沒有什麼好做的 直接回車
The following bridged networks have been defined:
. vmnet0 is bridged to eth0
All your ethernet interfaces are already bridged.
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes]
配置vmnet0 直接回車 有[yes]這種的就表示默認
Configuring a NAT network for vmnet8.
Please specify a name for this network. [NAT]
配置vmnet8 直接回車
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes]
探測DHCP 子網,自動探測,隨機選擇 默認yes 可直接回車
Probing for an unused private subnet (this can take some time)…
The subnet 192.168.92.0/255.255.255.0 appears to be unused.
The following NAT networks have been defined:
. vmnet8 is a NAT network on private subnet 192.168.92.0.
Do you wish to configure another NAT network? (yes/no) [no]
默認是no 直接回車 看見有another的就選擇no
Do you want to be able to use host-only networking in your virtual machines? [yes]
配置host-only 網絡環境 yes
Configuring a host-only network for vmnet1.
Please specify a name for this network.
[HostOnly]
直接回車
Do you want this program to probe for an unused private subnet? (yes/no/help) [yes]
直接回車
Probing for an unused private subnet (this can take some time)…
The subnet 192.168.185.0/255.255.255.0 appears to be unused.
The following host-only networks have been defined:
. vmnet1 is a host-only network on private subnet 192.168.185.0.
Do you wish to configure another host-only network? (yes/no) [no]
選no 回車
The bld-2.6.18-8.el5-i686smp-RHEL5 – vmnet module loads perfectly into the
running kernel.
 
安裝內核模塊
Please specify a port for remote connections to use [902]
選擇遠程服務端口
Please specify a port for standard http connections to use [8222]
當安裝完成後用http://IP:8222可以訪問server 服務器來配置虛擬機
Please specify a port for secure http (https) connections to use [8333]
當安裝完成後用https://IP:8333可以訪問server 服務器來配置虛擬機
The current administrative user for VMware Server is ”. Would you like to
specify a different administrator? [no]
登錄管理VMware-server的管理員帳號 可以指定系統裡已經有的帳號,no表示用root帳號
Using root as the VMware Server administrator.
In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]
生成SSL證書文件 直接回車即可
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:
這裡序列號為: A81AN-FYFDC-U7H25-426KH
輸入20位許可證後 回車 如果許可證正確下面的配置就一路回車就可以了
Creating a new VMware VIX API installer database using the tar4 format.
Installing VMware VIX API.
In which directory do you want to install the VMware VIX API binary files?
[/usr/bin]
In which directory do you want to install the VMware VIX API library files?
[/usr/lib/vmware-vix/lib]
The path “/usr/lib/vmware-vix/lib” 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 VMware VIX API document pages?
[/usr/share/doc/vmware-vix]
The path “/usr/share/doc/vmware-vix” does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]
The installation of VMware VIX API 1.6.2 build-156745 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-vix.pl”.
Enjoy,
–the VMware team
Starting VMware services:
Virtual machine monitor[確定]
Virtual machine communication interface[確定]
VM communication interface socket family:[確定]
Virtual ethernet[確定]
Bridged networking on /dev/vmnet0[確定]
Host-only networking on /dev/vmnet1 (background)[確定]
DHCP server on /dev/vmnet1[確定]
Host-only networking on /dev/vmnet8 (background)[確定]
DHCP server on /dev/vmnet8[確定]
NAT service on /dev/vmnet8[確定]
VMware Server Authentication Daemon (background)[確定]
Shared Memory Available[確定]
Starting VMware management services:
VMware Server Host Agent (background)[確定]
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines[確定]
The configuration of VMware Server 2.0.1 build-156745 for Linux for this
running kernel completed successfully.
完成後在浏覽器裡面用http://IP:8222或者https://IP:8333
其實就算用http://IP:8222也會轉到https://IP:8333的
到此Linux下的VMware-server安裝就算完成了
本文出自 “一路向北” 博客,請務必保留此出處http://showerlee.blog.51cto.com/2047005/1157138