Linux cluster operations tools: Clustershell and Pssh

Source: Internet
Author: User

Due to the need to install a Hadoop cluster, 10 machines need to be installed, initially intended to use SCP replication, and later found unacceptable (the actual scene may be several times the number of machine clusters, that is, 10 units do not want to do). Later found on the internet, discovered the Clustershell and pssh these two tools. These two tools can be used with one or the other.
Environment Description: centos6.5 Machine 10 units
Requirements: Identify a host A that can be executed synchronously on a different node by executing commands on a.
Premise: First configure a to each machine password SSH login.

Pssh Reference URL: http://www.linuxidc.com/Linux/2011-12/49635p2.htm
Implementation, take PSSH as an example (requires Python environment, also requires Setuptools):
1. Installation
# tar ZXVF pssh-2.3.1.tar.gz
# python./pssh-2.3.1/setup.py Install
# CD./pssh-2.3.1/bin/


2. Set up a TXT file, this side with Flume.txt as the name, the inside put each node IP, each line a
#./pssh-p-H ~/flume.txt uptime//test to see the start time of each node machine
Use:


3. Batch copy files from remote machine to local
./pslurp-r-H/host/test.txt-l/usr/local/software/home/hadoop/software software
Explanation: The-l local directory,/home/hadoop/software is the remote machine directory, software renamed directory.
Assuming that the remote machine has two A, B, then the file directory is copied: Usr/local/software/a/software and Usr/local/software/b/software

4. Bulk Copy local files to remote machine
./pscp-r-H/host/all.txt. /.. /software/usr/local/software


5. Batch execution of commands (in the case of a new directory, if the directory already exists, an error)
./pssh-h./host/all.txt-p Mkdir/usr/local/app

Linux cluster operations tools: Clustershell and Pssh

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.