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/01 Report--
This article mainly introduces "how to install and configure ClusterShell tools in Linux system". In daily operation, I believe many people have doubts about how to install and configure ClusterShell tools in Linux system. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to install and configure ClusterShell tools in Linux system". Next, please follow the editor to study!
Linux system if you want to know the load between multiple database servers, then you will use ClusterShell tools, as a sharp tool for Linux operation and maintenance, its installation and configuration is also a knowledge, so how to install and configure ClusterShell on Linux?
Installation and configuration of ClusterShell
The installation of ClusterShell is very Easy. If you use APT or YUM package management, it is basically a command. I will not talk about it. Here I will talk about how to install from the source code. You need to execute the following command in the source code directory:
Shell "python setup.py install
For ease of use, you also need to copy the configuration file to the specified directory:
Shell "mkdir / etc/clustershell
Shell "cp conf/* / etc/clustershell
Then configure the nodes we want to manage, suppose we configure a db group that contains three nodes of db_ [1-3]:
Shell "cat / etc/clustershell/groups
Db: db_1 db_2 db_3
Ready to query the current load of all database servers:
Shell "clush-b-g db" uptime "
Note: the premise is that you need to set password-free login on the server being operated. If it is not clear, please see below.
How to configure the server for password-free login?
If the ssh key is not generated beforehand, you need to:
Shell "ssh-keygen
Optional action: for convenience, we can give a more readable alias to the server that needs to be logged in. If you do a similar operation, the following "USER" @ "SERVER" can be replaced with the corresponding "HOST":
Shell "cat ~ / .ssh/config
Host db_1
Hostname "SERVER"
User "USER"
Port "PORT"
Host db_2
Hostname "SERVER"
User "USER"
Port "PORT"
Host db_3
Hostname "SERVER"
User "USER"
Port "PORT"
Then add the generated public key to the specified location of the server where you need to log in:
Shell "cat ~ / .ssh/id_rsa.pub | ssh" USER "@" SERVER "" cat-"" ~ / .ssh/authorized_keys "
If you can't remember how to spell authorized_keys correctly, you can go on to learn the use of ssh-copy-id, which makes the operation easier:
Shell "ssh-copy-id-I ~ / .ssh/id_rsa.pub"USER" @ "SERVER"
Note: for every password-free login server configured, it is best to do it manually, because the first connection will require manual confirmation of whether to save the information to the ~ / .ssh/known_hosts file.
At this point, the study on "how to install and configure ClusterShell tools on the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.