In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today, the editor to share with you is the linux server hosts file configuration steps, I believe many people do not understand, in order to let you know more, so give you a summary of the following, let's look down. I'm sure you'll get something.
Linux server hosts file configuration
Hosts file is a file responsible for rapid resolution of IP address and domain name in Linux system. It is saved in "/ etc" directory in ASCII format, and the file name is "hosts".
The hosts file contains the mapping between IP addresses and hostnames, as well as aliases for hostnames. In the absence of a domain name server, all network programs on the system resolve the IP address corresponding to a host name by querying the file, otherwise they need to use DNS service programs to solve the problem. Usually, the commonly used domain name and IP address mapping can be added to the hosts file to achieve fast and convenient access.
Let's introduce the methods and steps to modify the hosts configuration file:
Required tools: vim/vi
1. Install the vim editor
Sudo apt install vim-y # debiansudo yum install vim-y # readhat
2. Modify the hosts file using the editor
1. Sudo vim / etc/hosts2. Press the I key to enter edit mode
The format of the hosts file is as follows:
IP address hostname / domain name
Part I: network IP address
Part II: hostname or domain name
Part III: host name alias
For example:
127.0.0.1 localhost.localdomain localhost192.168.1.100 linmu100.com linmu100192.168.1.120 ftpserver ftp120
3. Save after the modification is completed.
1. Press ESC2. Input: wq
On the linux server hosts file configuration steps to share here, I hope that the above content can have a certain reference value, you can learn to apply. If you like this article, you might as well share it for more people to see.
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.