In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Introduction to the basic Network configuration method of Linux Network
Linux profile
1. Network profile
Vim / etc/sysconfig/network-scripts/ifcfg-ens33
Each time the modification is completed, use the systemctl restart network command to make the configuration effective.
two。 Hostname Profil
/ etc/sysconfig/network
(1) / etc/sysconfig/network NETWORKing hosts in this file will not be able to connect to the network.
(2) under Windows, the same hostname cannot be transferred in the same local area network. It is required that there can be no hosts with the same hostname in the LAN. In Linux, there can be hosts with the same hostname in the LAN, such as the default hostname: localhost.localdomain.
(3) after modifying the hostname in the / etc/sysconfig/network file, you need to restart the computer to take effect. Use the hostname hostname command to temporarily change the hostname, which will expire when the computer is restarted. You can view the current hostname through the hostname command.
4) you can also use the hostnamectl set-hostname host name to modify the host name and use the su command to take effect.
3.DNS profile
/ etc/resolv.conf
4. Local host mapping file
/ etc/hosts
VMware network parameter configuration
(1) ifconfig can check the network status (can view IP address and subnet mask, but not gateway and DNS address), and can temporarily set the IP address and subnet mask of a certain network card.
(2) ifconfig network interface IP temporarily sets the IP address (use ifconfig network interface: 0 IP to configure virtual interface)
(3) vim / etc/sysconfig/network-scripts/ifcfg-ens33 permanently sets the IP address by modifying the configuration file
(4) ifconfig network interface up enables network interface
(5) ifconfig network interface down shuts down the network interface
(6) netstat queries network status
(7) route viewing routing table is equivalent to netstat-r
(8) nslookup [hostname or IP]: resolve domain name or IP address
(9) ping [option] ip or domain name: detect the network status of the specified IP or domain name.
Detailed steps for configuring dual network cards
Add a network card and set both network card devices to host-only connection
Set ens33 to a static address by modifying the configuration file
Make a copy of the ens33 configuration file and modify the file name
Modify the copied configuration file to replace the information of the new network card with the information of the original network card (the UUID number information can be deleted and the system will automatically recognize it)
Synchronize files remotely
Scp local file path user @ ip: remote user file path synchronizes local files to remote users (know each other's root password)
Scp user @ ip: remote user file path local path synchronizes remote user files locally (please know the root password of the other party)
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.