In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to configure the CVM network card? After installing the CVM, some users will find that there are many files that they are not very familiar with, such as the configuration file of centos network card in linux system. Next, the editor of Xiaoyun Technology will introduce you.
After Linux is installed, the network card is configured with dynamic IP by default. We can enter ip addr in the linux terminal to view it.
For example: [root@localhost ~] # ip addr
After the input is completed, there will be a lo and enp0sxxx network card, if we need, is to configure the enp0sxx network card.
It should be noted here that if the network card set in the virtual software is a network address translation NAT
So in the network card of enp0sxx, the ip address shows 10.0.2.xxx.
Centos's network card configuration file directory is in / etc/sysconfig/network-scripts
For example: [root@localhost ~] # cd / etc/sysconfig/network-scripts
You need to enter this directory first, where ls can find the configuration file of enp0sxx.
The file name is ifcfg-enp0sxxx
Then use the vi command to open the file
For example: [root@localhost ~] # vi ifcfg-enp0sxxx
After entering, use command I to edit it
You only need to change the parameters of the network card configuration file to
BOOTPROTO=static
IPADDR=192.168.1.xxx
GATEWAY=192.168.1.x
NETMASK=255.255.255.0
ONBOOT=yes
What needs to be explained here is that
BOOTPROTO=static refers to changing the network card mode to static.
IPADDR=192.168.1.xxx, this is the ip address of the host.
GATEWAY=192.168.1.1 this is the gateway of the host, which needs to be set to the first ip address of the router in segment D
NETMASK=255.255.255.0 subnet mask this is the default
The ONBOOT=yes network card starts automatically after booting.
After the modification is completed, the ESC key exits the editing mode. After entering the editing mode, enter: wq to exit the save.
And you need to restart the network card using the command systemctl restart network.
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.