In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to install the CentOS7 system in VMware. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
1. Three network connection schemes for virtual machines 1.1 bridging mode (Bridged)
Network segment features: Windows hosts and virtual hosts (such as CentOS7) are on the same network segment.
Communication characteristics: after the network configuration of the virtual machine, the virtual machine can directly access the Internet, that is, it can send data to the external network; at the same time, because the virtual machine and the Windows host have the same network segment, the external network can also directly access the virtual machine, that is, it can send data directly to the virtual machine.
1.2 Network address Translation Mode (NAT)
Network segment characteristics: the Windows host and the virtual host (such as CentOS7) are not on the same network segment, and the network segment is randomly assigned by the DHCP service of VMware.
Communication characteristics: after the network configuration of the virtual machine, the virtual machine wants to access Internet and needs to be processed by the address translation module before it can send data to the public network. However, because the virtual machine and the Windows host are not in the same network segment, and the address translation module is also needed for the external network to access the virtual machine, the external network cannot use the address translation module, that is, it cannot directly send data to the virtual machine, and other hosts with the same network segment as the Window host cannot directly access the virtual machine, so how can Xshell connect the virtual machine? Need to go through the VMnet8 virtual network card.
VMware Network Adapter VMnet8 action
The VMware Network Adapter VMnet8 virtual network card is used to communicate with the virtual machine and has nothing to do with the connection of the virtual machine to the external network. You can disable VMnet8 on the Windows host, where the virtual machine can still connect to the public network, but cannot connect to the virtual machine using Xshell.
1.3 Host-only mode (Host-only)
Host-Only mode actually means that NAT mode removes virtual NAT devices, and then uses VMware Network Adapter VMnet1 virtual network card to connect VMnet1 virtual switch to communicate with virtual machine. Host-Only mode separates the virtual machine from the external network, so that the virtual machine becomes an independent system and only communicates with the host.
It is rarely used in practice, so I won't repeat it here.
2. CentOS7 uses configuration 2.1 in NAT mode to configure the virtual network card VMnet8 of the Windows host
After installing CentOS7 (virtual host, use CentOS7 directly later), CentOS7 will automatically get an IP through DHCP service. The IP set here should be different from that of CentOS7 in the same IP address range.
2.2 configuration on VMware 2.2.1 configuration of VMware
Open VWware, select the menu "Edit", and select "Virtual Network Editor" in the drop-down box.
Select VMnet8 and configure as follows:
Click "NAT Settings" to configure as follows:
2.2.2 configuration of CentOS7
Select CentOS7- > Edit Virtualizer Settings-> Network Adapter-> NAT Mode
2.3 configuration on CentOS7
Power on the CentOS to ensure that it starts normally.
2.3.1 set the network settings for CentOS7
Instruction
Vim / etc/sysconfig/network-scripts/ifcfg-ens33
The older version of CentOS is
Vim / etc/sysconfig/network-scripts/ifcfg-eth0
The configuration is as follows:
Key part
# set static IP to use BOOTPROTO=static# the CentOS7 address IPADDR=192.168.136.80# subnet mask is consistent with the VMnet8 setting on Windows NETMASK=255.255.255.0# gateway, and consistent with the NAT setting on the virtual machine GATEWAY=192.168.136.2
After the setup is complete, restart the network or virtual machine.
2.3.2 Test the CentOS7 network
You can use ping instructions, such as
Ping www.baidu.com
If you can respond normally, you will be connected successfully. If unknown host appears, you need to configure DNS.
Configure DNS
Instruction
Vim / etc/resolv.conf
Can be set to
Just add nameserver at the end of the file and remember to restart.
2.4 CentOS7 partial commands
The file location / etc/inittab
Shutdown
# shutdown init 0
Restart
# restart init 6
Simple version
# enter CentOS simplified version init 3
Full version
# enter the full version of CentOS init 5 on how to install the CentOS7 system in VMware to share here. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.