Virtual machine Environment CentOS How to surf the Internet

Source: Internet
Author: User

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:

    1. For beginners to learn Linux
    2. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.