Oracle VM VirtualBox +ubuntu server building virtual Server LAN
Because the company project needs to do the architecture prototype demo, but in the framework of the deployment can not fully use the real machine to get (cost),
So you can only build a virtual machine LAN environment here. It's also relatively simple, here is just a record.
Note: Install VirtualBox, install Ubuntu Server on VirtualBox and install software on server is not covered.
1. Configuring the Host Network
Right-click local Connection = = Property = = "Share = =" tick the 2 check boxes for Internet Connection Sharing
Right-click local connection = = "Property = =" Network = = "Check VirtualBox bridged Networking driver=" installation (three all installed under the test)
2. Set the network settings for each virtual Ubuntu server on VirtualBox:
Nic 1: Connection mode: Bridging network card
Interface Name: Realtek PCIe GBE Family Controller (Be careful not to select that virtual machine)
Senior:
Control chip: Intel pro/1000 MT Desktop
Promiscuous mode: Deny
MAC Address: Default
Tick Access Network
Sure you can
3. Restart the Oracle VM VirtualBox and start Ubuntu Server.
Configure the static IP address of Ubuntu server (so that it is equal to the host on the network),
(1). Configure static IP:
sudo vim/etc/network/interfaces
Comment out the default iface eth0 inet xxx
Add the following configuration:
Iface eth0 inet Static
Address 192.168.2.15 (Intranet available IP, my host network IP is 192.168.2.12)
Gateway 192.168.2.254 (intranet gateway, same as host)
Netmask 255.255.255.0
Save exit
(2). Configure DNS
sudo vim/etc/resolv.conf
I don't know why, it's gone after every reboot. But it doesn't affect my needs, so I have no control over it.
4. Finally execute the sudo/etc/init.d/networking restart to make the network configuration effective. or restart the service.
Here I have configured several Ubuntu servers in this way.
This time can be found that the host and these servers can communicate with each other, these servers can also surf the Internet, each server can also communicate with each other.
Here, you can use them to play!
This article is from the "re-learn Java" blog, please be sure to keep this source http://3131854.blog.51cto.com/3121854/1663501
Oracle VM VirtualBox +ubuntu server building virtual Server LAN