![](https://www.osyunwei.com/wp-content/uploads/2012/01/vmware.jpg)
说明:
Linux系统:CentOS 5.8 64位
IP地址:192.168.0.98
VMware-Workstation版本:9.0(目前最新版)
具体操作:
一、在Linux系统中安装VMware-Workstation虚拟机软件
1、安装Linux桌面环境
yum groupinstall "X Window System" #安装X Window
yum install xdm
yum groupinstall "GNOME Desktop Environment" #安装GNOME桌面
vi /etc/inittab #编辑
id:5:initdefault: #修改3为5
:wq! #保存退出
2、配置vnc服务,开启linux远程桌面连接
说明:
vncserver在调用的时候,会根据你的配置来启用server端的监听端口,
端口默认是从5900开始,再加上你的桌面号。
比如你的桌面号为1,则vnc的连接端口号为5900+1=5901
比如你的桌面号为10000,则vnc的连接端口号为5900+10000=15900
使用root账号登录
rpm -q vnc-server #检查系统是否安装vnc
yum install vnc-server #安装
vncserver #启动,会提示输入密码,这个密码是远程登录时所需要输入的密码,输入密码,回车
vi /etc/sysconfig/vncservers #vnc配置文件
VNCSERVERS="10000:root" #把前面的#取消了10000:root (桌面号:用户)
:wq! #保存退出
vi /etc/sysconfig/iptables #编辑防火墙配置,开启15900端口
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m
tcp --dport 15900 -j ACCEPT
:wq! #保存退出
service iptables restart #重启防火墙,使刚才的端口配置生效
vi /etc/selinux/config #编辑,关闭SELINUX
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
:wq #保存退出
cd ~/.vnc
vi xstartup #编辑,注释掉twm &这一行,添加下面一行
gnome-session
:wq! #保存退出
chkconfig vncserver on #设置开机启动
vncpasswd #更改vnc连接密码
vi /boot/grub/grub.conf #编辑
default=0 #修改为0
:wq! #保存退出
shutdown -r now #重启系统
使用VNC客户端登录到Linux系统
VNC下载地址:http://www.ouyaoxiazai.com/downinfo/d12998.html
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容
版权所有,转载请注明出处及原文链接
3、安装VMware-Workstation
yum install gtk* #安装
ldconfig
下载地址(需要注册登录):https://my.vmware.com/cn/web/vmware/details?productId=293&downloadGroup=WKST-900-LX
上传VMware-Workstation-Full-9.0.0-812388.x86_64.bundle到/usr/local/src目录
使用VNC客户端登录到linux,如下图所示
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1768.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1769.jpg)
cd /usr/local/src #进入软件存放目录
chmod +x
VMware-Workstation-Full-9.0.0-812388.x86_64.bundle #添加执行权限
./VMware-Workstation-Full-8.0.0-471780.i386.bundle #执行安装
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1770.jpg)
vmware #启动vmware
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1771.jpg)
选择 I agree 同意
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1772.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1773.jpg)
Yes
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容
版权所有,转载请注明出处及原文链接
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1774.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1775.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1776.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1777.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1778.jpg)
Install
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1779.jpg)
正在安装
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1780.jpg)
正在安装
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1781.jpg)
安装完成,Close 关闭
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1782.jpg)
Accept
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1783.jpg)
VMware Workstaion安装完成!
二、在VMware-Workstation虚拟机中安装Windows Server
2012
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1785.jpg)
新建虚拟主机
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1786.jpg)
选择自定义
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1787.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1788.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1789.jpg)
选择Windows Server 2012
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1790.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1791.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1792.jpg)
内存分配
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1793.jpg)
选择网络模式,默认即可
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1794.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1795.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1796.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1797.jpg)
分配硬盘大小
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1798.jpg)
Next
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1799.jpg)
自定义配置
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1800.jpg)
选择CD/DVD,Use iso image 找到系统镜像文件
Save 保存
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1801.jpg)
打开电源,开始安装Windows Server 2012
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1802.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1803.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1804.jpg)
安装版本选择
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1805.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1806.jpg)
系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容
版权所有,转载请注明出处及原文链接
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1807.jpg)
磁盘分区
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1808.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1809.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1810.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1811.jpg)
开始安装
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1812.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1813.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1814.jpg)
设置账户密码
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1815.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1816.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1817.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1818.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1819.jpg)
![](https://www.osyunwei.com/wp-content/uploads/2012/11/1820.jpg)
系统安装完成
至此,在Linux系统下的虚拟机VMware-Workstation中安装Windows Server
2012教程完成
扩展阅读:
虚拟机端口映射
1 、vi /etc/vmware/vmnet8/nat/nat.conf #编辑
80 = 172.16.202.128:80 #映射主机的80端口到虚拟机的80端口
2、vmware-networks --stop #停止vmware网络
vmware-networks --start #启动vmware网络