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--
When I used CentOS7 system for the first time, I encountered a lot of problems in network configuration. Feature this blog to record the solution to the problem. You are welcome to correct me.
I. Virtual machine settings
At the top of the VMware interface, select Virtual Machine-> Settings: change the network connection to bridge mode, as shown in the following figure:
Check the DNS address of the host.
Win+R enter cmd, launch the command line interface, enter ipconfig/all, and view the host DNS server address, as shown in the following figure:
Note that since this machine is wireless, this is the DNS server address of the wireless local area network. Write down this address, which is useful later.
Third, modify the CentOS7 network configuration file
1. Open the terminal in CentOS7 and enter cd / etc/sysconfig/network-scripts/
two。 Enter vi ifcfg-ens33 to open the network configuration file ifcfg-ens33, as shown in the following figure:
The configuration file is as follows:
TYPE=Ethernet # Network card type: Ethernet proxy _ METHOD=none # proxy: turn off status BROWSER_ONLY=no # just browser: no BOOTPROTO=dhcp # boot protocol of network card: DHCPDEFROUTE=yes # default route: yes IPV4_FAILURE_FATAL=no # No IPV4 fatal error check is not enabled Test: no IPV6INIT=yes # whether IPV6 initializes automatically: whether IPV6_AUTOCONF=yes # IPV6 is automatically configured: whether IPV6_DEFROUTE=yes # IPV6 can be a default route: yes IPV6_FAILURE_FATAL=no # No IPV6 fatal error detection: no IPV6_ADDR_GEN_MODE=stable-privacy # IPV6 address generation model: stable-privacy NAME=ens33 # Network card physical device name UUID=42773503-99ed-443f-a957-66dbc1258347 # universal unique identifier DEVICE=ens33 # network card device name ONBOOT=no # whether to boot Systemctl restart network is available to restart the network
3. Modify ONBOOT=yes and add DNS1=192.168.31.1, this DNS address is set to the local DNS address (previously noted address)
Enter Esc: wq! Exit, as shown in the following figure:
Note that if the user does not have enough privileges, an error will be prompted when saving, and it is recommended to log in to the root account.
4. Enter systemctl restart network to restart the network without any information, which means the network restart is successful, as shown in the following figure:
At this point, all the settings are complete, open the browser and you can surf the Internet.
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.