In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Because my development environment is to install Centos in the VMWare virtual machine, and then set the block in the host file, so I can jump directly to the CentOS of the virtual machine, but the IP address of the virtual machine will always change, so it is troublesome to modify the host file at any time. Decide that the virtual machine adopts fixed IP mode, and record the steps to facilitate future reference. I hope it can also help other partners.
Environment: host is Windows 10 VMWare 12 Centos 7.5
1. Set the network connection mode of the virtual machine
Click Virtual Machine name-> right-click-> Settings
Modify the network adapter. You can choose "NAT mode" or "custom" for network connection.
two。 Edit-> Virtual Network Editor
Select VMNet8 and click "change Settings"
Remove the check before "assign IP addresses to virtual machines using local DHCP services"
Set subnet IP segment and subnet mask
The subnet IP segment is as different as possible from the IP segment of the host.
Click "NAT Settings"
Setting the gateway cannot be the same as the IP address of the virtual machine. Remember that this gateway will be used in step 3, corresponding to GATEWAY.
3. Modify the configuration file of CentOS in the virtual machine
Cd / etc/sysconfig/network-scripts enters the configuration directory
Modify the configuration file vim ifcfg-eno16777736 [different systems, different names of network cards]
BOOTPROTO=staticONBOOT=yesIPADDR=192.168.8.123 # needs to be unified with the set IP segment, NETMASK=255.255.255.0GATEWAY=192.168.8.2 # needs to be the same as the gateway set by the virtual network card in step 2, DNS1=8.8.8.8 # this must be set, otherwise it will lead to ping access to the external IP,ping domain name.
Save and exit after modification
Restart network services
Systemctl restart network.service
Check that the IP address is already the IP address to be set
Ping www.baidu.com can already access the public network.
Extend here to save some exit commands:
W Save the file without exiting vi
W file saves the changes to file and does not exit vi
: w! Forced save, do not launch vi
Wq saves the file and exits vi
: wq! Force to save the file and exit vi
Q: quit vi without saving the file
: q! Do not save the file, force to exit vi
: e! Discard all changes and edit since the last time the file was saved
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.