How Linux systems Install and configure the Clustershell tool to understand load conditions

Source: Internet
Author: User
Tags ssh

Linux system if you want to understand the load between multiple database servers, then you will use the Clustershell tools, as a Linux operation tool, its installation and configuration is also a learning, then on Linux to install and configure Clustershell?

 Installation and configuration of Clustershell

Clustershell installation is easy, if the use of apt or yum package management, the basic is a command of things, I will not say, here to say 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 will also need to copy the configuration files to the specified directory:

Shell "Mkdir/etc/clustershell

Shell "CP conf/*/etc/clustershell

Then configure the node we want to manage, assuming we have a DB group configured with Db_[1-3] three nodes:

Shell "Cat/etc/clustershell/groups

Db:db_1 db_2 Db_3

Be ready to query the current load on all database servers:

Shell Clush-b-G db "uptime"

Note: The prerequisite is that you need to set the password-free login on the operating server, if not clear, please see the following content.

How do I configure the server for password-free logons?

If you do not generate the SSH key in advance, you need to be Mr.:

Shell "Ssh-keygen

Optional operation: For convenience, we can give the server that needs to log in a better readability alias, if you do a similar operation, then the later "USER" @ "server" can be replaced by the corresponding "HOST":

Shell "Cat ~/.ssh/config

Host db_1

Hostname "The SERVER"

User "user"

Port "Port"

Host db_2

Hostname "The SERVER"

User "user"

Port "Port"

Host Db_3

Hostname "The SERVER"

User "user"

Port "Port"

The generated public key is then added to the specified location of the server where the login is required:

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 how to use Ssh-copy-id, a command that makes it easier to do things:

Shell "Ssh-copy-id-i ~/.ssh/id_rsa.pub" "USER" @ "SERVER"

Note: Each configured a password-free login server, it is best to manually actually operate, because the first connection will require manual confirmation of whether to save information to the ~/.ssh/known_hosts file.

The above is the Linux installation configuration Clustershell method introduced, because the Clustershell installation configuration requires password-free logon server, so this article also made a related explanation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.