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/01 Report--
How to modify hostname in Linux? 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.
Modify hostname
[root@centos7 ~] $hostnamectl set-hostname hadoop001 # use this command to take effect immediately and restart also takes effect [root@centos7 ~] $hostname # View hadoop001 [root@centos7 ~] $vim / etc/hosts # Edit the hosts file and add hostname [root@centos7 ~] $cat / etc/hosts # to 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 hadoop001::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 check 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 hadoop001::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Password-free login
Scp id_rsa.pub lau@192.168.1.108:/home/lau/.ssh/pub_key# login user cd ~ / .ssh/cat pub_key > > authorized_keyschmod 600 / home/lau/.ssh/authorized_keys what is the Linux system Linux is a free to use and free dissemination of UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-thread and multi-CPU operating system Using Linux, you can run major Unix tools, applications, and network protocols.
This is the answer to the question about how to modify hostname in Linux. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about 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.