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--
How to set up linux system networking? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
Log into the Linux system. First, log in to the linux interface with your root account and password (Note: it must be an administrator user or permission). If other users log in, use the su command to switch users and enter the password. The result is as follows:
Modify the Linux ip address. Use the command vi / etc/sysconfig/network-scripts/ifcfg-eth0 to change the ip address of the Linux system to the network segment allowed by the router or network switch, add a command DNS = 8.8.8.8, press the keyboard ESC key after modification, and type wq to save and exit, as shown in the following figure:
Verify that Linux is connected to the network. Use the ping command to directly ping a website. If the host cannot be identified, it indicates that it is not connected to the network. The ping Baidu of this department takes Baidu as an example. The result shows that it is not online as shown in the following figure:
Linux networking. The command vi / etc/resolv.conf writes nameserver 8.8.8.8 in the open text, and the result is shown in the figure:
Restart the Nic: use the command: service network restart to restart, and the result is as follows:
Verify. Use the ping Baidu command to check whether there is a reply. If so, the network is successful. The result is shown below:
Summary of orders:
Su: switching administrative users
Vi: Editing configuration text
/ etc/sysconfig/network-scripts/ifcfg-eth0: the path of the Linux Nic configuration file
DNS = 8.8.8.8: configure the ip address of the DNS server
/ etc/resolv.conf: DNS server profile path
Nameserver 8.8.8.8: sets the DNS server IP.
Matters needing attention
The set IP must be able to connect to the external network, that is, it can pass through switching devices such as routers.
After the configuration is completed, some of the systems do not take effect. You need to restart the network card service.
This is the answer to the question about how to set up the linux system networking. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
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.