Virtual machine Environment CentOS How to surf the Internet----------by ruffianfish. Ruffian Fish
Because I am using the virtual machine environment, so all operating angles from the virtual machine.
Advantages of the virtual machine environment:
- For beginners to learn Linux
- Never be afraid to make the system bad, because the virtual machine has a snapshot function, this is a god-like function, you can save the system environment to a time period, when your system problems, you can return to this point in time
Because the following tutorials need to be used for the network, so configure the network
1. We are now looking at our network situation, because we will need to use the network
View the next IP address, ifconfig
Figure Fish.1
Ping baidu.com, such as
Fig. fish.2
Ping baidu.com After the return, has been stuck in the ' _ ', indicating that the network is not working, then press any key is not responding, to press "CTRL + Z" return, the following configuration network
Fish.3
My virtual Machine Network configuration is NAT mode, which shares the IP with the host.
View Host Virtual network
Fig. fish.4
Note here to see VMware8 because, here VMware8 is the net mode:
IP Address: 192.168.106.1
Subnet Mask: 255.255.255.0
Then you need to configure the CentOS network segment for the 106 IP, gateway for 192.168.106.2-245, note cannot be 192.168.106.1, because this is the host's virtual network is used off.
Open the System Configuration folder:
Figure fish.5
FISH1:CD etc Open System Configuration folder
Fish2:vi sysconfig/network-scripts/ifcfg-eth0 Editing Etho configuration file
Figure fish.6
bootproto=static for static IP
ipaddr=192.168.106.17 IP Address
netmask=255.255.255.0 Subnet Mask
gatway=192.168.106.2 Gateway
dns=8.8.8.8
And everyone's popularity, 114.114.114.114 and 8.8.8.8 is the global open DNS service address, can also be used on their own computers.
Exit::
Save: wq!
View IP Address
Figure fish.7
Configuration successful, ping Baidu
Figure fish.8
It's time to surf the internet.
Virtual machine Environment CentOS How to surf the Internet