VMware 是什么 ?
VMware 是一套能虛擬安裝各種操作系統(tǒng)的軟件;能為每個操作系統(tǒng)虛擬出安裝操作系統(tǒng)的硬件環(huán)境;在VMware中的每個操作系統(tǒng)都是相對獨(dú)立的,每個虛擬的系統(tǒng)都相當(dāng)于一臺獨(dú)立的并帶有系統(tǒng)的機(jī)器;
在VMware 中,您可以同時打開多個虛擬的操作系統(tǒng);并且還能在一臺機(jī)器上,虛擬多個操作系統(tǒng)來操作虛擬網(wǎng)絡(luò);比如您在Windows中安裝和VMware ,就可以模擬架設(shè)局域網(wǎng)來學(xué)習(xí);
VMware 有Linux、Windows以及MACOS等版本;
本文介紹的是VMware的 Linux 版本的安裝和使用;
安裝準(zhǔn)備:
1、VMware Linux 版本;我用的是Linux版本VMware 5.0 的源碼包 ;
2、Windows安裝盤;
操作環(huán)境:
系統(tǒng)環(huán)境:Fedora Core 4.0 ,開發(fā)工具(gcc,automake,make,perl等);kernel-devel 要都安裝上;
硬件環(huán)境;Intel C 1.4 ,內(nèi)存512M,顯示卡集成i810x
一、安裝VMware在Linux (Fedora Core 4.0)中;
[root@localhost beinan]# tar zxvf VMware-workstation-e.x.p-15576.tar.gz
[root@localhost beinan]# cd vmware-distrib/
[root@localhost vmware-distrib]#./vmware-install.pl
或
[root@localhost vmware-distrib]# perl vmware-install.pl
[/usr/bin] 注:遇到類似的,請直接回車;
Is this what you want? [yes] yes 注:遇到類似輸入Yes的;
注:當(dāng) perl vmware-install.pl 到了網(wǎng)絡(luò)配置的時候,您可以都選擇為YES ,也可以根據(jù)自己的網(wǎng)絡(luò)環(huán)境來YES或者NO ,最好都是YES吧;這是配置VMware的基礎(chǔ),至于虛擬的系統(tǒng)網(wǎng)絡(luò)怎么配置都是根據(jù)整個網(wǎng)絡(luò)情況而來了。可以根據(jù)我們網(wǎng)絡(luò)情況對Windows來配置 Windows的網(wǎng)絡(luò);
二、添加Windows虛擬系統(tǒng)到VMware中;
1、添加新的虛擬機(jī);點擊[New Virtual Machine],我們來添加Windows的虛擬機(jī);

開始創(chuàng)建虛擬機(jī):

2、虛擬機(jī)配置添加過程的選擇:您可以選擇系統(tǒng)默認(rèn)的,也可以自定義,其實默認(rèn)配置足夠;

3、選擇創(chuàng)建虛擬系統(tǒng)的類型:這也是我們本文正要學(xué)習(xí)的Winodws;

虛擬機(jī)名:WinXP,自己寫一個就行;如果不指定是放在當(dāng)前用戶的家目錄中的.vmware目錄中,如果您的/home目錄沒有那么大,最好指定一個目錄。比如我指定在了/mnt/hda10這個目錄中,我把一個分區(qū)掛載到了/mnt/hda10,體積有15G大小;這還不夠,還要確保您要把虛擬機(jī)存放的目錄是對所用的用戶是可寫的;只是權(quán)限的事,我是如下做的;
[root@localhost beinan]# mkdir /mnt/hda10/winxp
[root@localhost beinan]# chown -R /mnt/hda10/winxp
[root@localhost beinan]# chmod -R 777 /mnt/hda10
所有用戶都是可讀可寫可執(zhí)行;我上面配置的目錄屬主沒有太大的意義了;因為權(quán)限都讓我打開了,主要是這樣做簡單,安全不安全是另一回事了,本來也是實驗性的;;)

4、網(wǎng)絡(luò)配置:如果您是通過路由器或者別的機(jī)器的網(wǎng)關(guān)上網(wǎng),就用bridged networking 就行;比如DHCP 獲取IP,只在是Windows安裝中或者安裝完成后,配置為DHCP就行了;如果您是通過網(wǎng)關(guān),并且是非DHCP的,你可以在Windows安裝的過程中指定您的機(jī)器的IP和網(wǎng)關(guān);
如果您只有一臺機(jī)器,并且在Fedora Core 4.0 中是通過pppoe或者ppp拔號上網(wǎng)的,首先要讓Linux有支持共享上網(wǎng)的能力,這在LinuxSir.Org 網(wǎng)絡(luò)版中有解決辦法;
其實網(wǎng)絡(luò)比較好配置,和您操作幾臺機(jī)器的網(wǎng)絡(luò)是相似的,或者說是一樣的;把虛擬的操作系統(tǒng)看成是一個獨(dú)立的機(jī)器就OK了。

5、虛擬機(jī)磁盤的大小的設(shè)定:
Windows XP 有近兩G大小,自己根據(jù)情況來設(shè)定虛擬磁盤大小;我設(shè)置為10G;在Winows安裝的過程中,我又把這10G分成兩個區(qū);

6、Windows虛擬機(jī)的各項配置;
點擊[Edit Virtual Machine Setting],就可以看到所有的設(shè)置,您可以點一點,比如內(nèi)存的大小的配置要調(diào)大一點,要是4的倍數(shù);網(wǎng)卡也能自己來配置;根據(jù)自己的情況來吧;


這是輸入VMware序列號界面;序列號是可以申請獲得的,自己去找找看?不要給我要,我沒有 ;:(


問你是否現(xiàn)在注冊,寫否也行, 以后注冊;

三、在虛擬機(jī)上安裝Windows系統(tǒng):
1、安裝過程:
首先我們要為剛才添加的WinXP開機(jī);然后點出來的畫面,如果您是臺式機(jī),就按一下DEL鍵,讓CDROM 開機(jī)自動運(yùn)行;我們就能插入光盤來安裝Windows了;
下面是幾幅圖,其它安裝過程就免了;





其它過程免;下面我們介紹安裝VMware tools ;
2、安裝VMware tools :
點擊VM菜單,選擇安裝VMware tools install ; VMware tools 就放到了Windows系統(tǒng)中的光盤中,我們點擊鼠標(biāo)就能簡單的安裝上了;




后記:祝新手弟兄學(xué)有所得;
討論:禁止叫罵,技術(shù)討論歡迎中~;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++附:單臺機(jī)器用非路由ADSL的配置:(如果您用的是路由器或者通過網(wǎng)關(guān)上網(wǎng),不要看以下部份;)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
首先要配置Linux的網(wǎng)卡,把Linux的網(wǎng)卡和虛擬的網(wǎng)卡都設(shè)置在 192.168.0.這個網(wǎng)段上,Linux的網(wǎng)卡的IP設(shè)置為192.168.1.1 ,不要設(shè)置網(wǎng)關(guān);虛擬機(jī)的網(wǎng)卡設(shè)置為192.168.1.2;掩碼都是255.255.255.0;虛擬機(jī)要指定網(wǎng)關(guān)和DNS;DNS的可以用 202.96.128.143 和202.96.134.133
試試再說吧,我用的是路由器上網(wǎng),把路由器配成自動拔號,并且能DHCP的就行了;
一、查看是否安裝了rp-pppoe
[root@localhost beinan]# rpm -qa rp-pppoe
rp-pppoe-3.5-27
如果沒有安裝,請找出安裝盤,把rp-pppoe安裝上;
[root@localhost beinan]#rpm -ivh rp-pppoe*
二、配置rp-pppoe
在終端上以root權(quán)限運(yùn)行
#adsl-setup
[root@LinuxSir02 root]# adsl-setup
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): ADSL提供商給的用戶名,寫在這里
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0): eth0這是ADSL通過第一臺機(jī)器的第一張網(wǎng)卡eth0提供上網(wǎng)
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):在這里按一下回車就行了。
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: 202.96.134.133 這是DSN,最好用你本地電信給的
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 202.96.168.68這是第二個DNS,也是電信給的。
PASSWORD
Please enter your Password:在這里把 ADSL提供商給的密碼寫上
Please re-enter your Password:確認(rèn)密碼
USERCTRL
Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 2
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no):yes
** Summary of what you entered **
Ethernet Interface: eth0
User name: ADSL用戶名
Activate-on-demand: No
Primary DNS: 202.96.134.133
Secondary DNS: 202.96.168.68
Firewalling: MASQUERADE
User Control: yes
Accept these settings and adjust configuration files (y/n)?y
三、在/etc/rc.d/rc.local中加入如下:
echo 1 > /proc/sys/net/ipv4/ip_forwardiptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE