Home > Operation and Maintenance > CentOS > How to access the Internet in centos system under virtual machine environment

How to access the Internet in centos system under virtual machine environment

王林
Release: 2020-03-21 14:01:18
Original
3194 people have browsed it

How to access the Internet in centos system under virtual machine environment

The virtual machine network configuration is NAT mode and shares ip with the host

How to access the Internet in centos system under virtual machine environment

View the host virtual network

How to access the Internet in centos system under virtual machine environment

(Recommended tutorial: centos usage tutorial)

Note that you need to check VMware8 here because VMware8 here is in net mode.

Ip address: 192.168.106.1

Subnet mask: 255.255.255.0

Then you need to configure centos with an IP network segment of 106 and a gateway of 192.168.106.2-245, please note that it cannot be 192.168.106.1, because this is used by the virtual network of the host.

Open the system configuration folder:

cd etc
Copy after login
vi sysconfig/network-scripts/ifcfg-eth0
Copy after login

Edit etho configuration file

How to access the Internet in centos system under virtual machine environment

Bootproto=static is 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

Tips: 114.114.114.114 and 8.8.8.8 are globally open Dns service addresses, which can also be used on your own computer.

Save the file and exit.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to access the Internet in centos system under virtual machine environment. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template