之前遇到一個瓶頸, 希望有自己寫程式的測試機. 但又不可能在家用一台 Server (口袋沒有麥可!!)..
有時寫 code 時. 習慣用 vi 來寫code 的我.. 用 UltraEdit 來寫.. 真的是十分不方便
(雖說 UltraEdit 功能很強大, 可能是寫的 FU 不對吧.... )

只好用自己的筆電. 灌上 VirtualBox.. 然而我的用意是. 可以對外連線.. 爬了一些文..
終於知道如何設定    ... 真是太感動了

安裝步驟

1. 安裝 VirtualBox + 並安裝 CentOS
2. Virtual Box 的網路設成 NAT 模式
4. 將所灌的 OS (範例: CentOS) IP 設為 DHCP
3. 開啟windows 中的 [命令提示字元]
設上對外可以指到 Virtual Box

VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 22

VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol" TCP
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort" 80
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/HostPort" 80

VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ftp/Protocol" TCP
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ftp/GuestPort" 21
VBoxManage setextradata Server "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ftp/HostPort" 21

Server 則是Virtual Box 的 名稱..

:D 醬就大功告成了呀.......  

 

文章標籤
全站熱搜
創作者介紹
創作者 王小明 的頭像
王小明

王小明的部落格

王小明 發表在 (0)