Friday, March 25, 2011

Manage multiple Linux servers with ClusterSSH

 

If you are a Linux system administrator, chances are you have more than a machine you are on a daily basis for responsible. You have even a Bank of machines that you maintain that are similar - a farm of Web servers, for example.. If you must enter the same command on multiple machines at once, you can log each with SSH and do it serially or you can save time and effort and use a tool like ClusterSSH.

ClusterSSH is a TK/Perl wrapper standard Linux tools like XTerm and SSH. As such, it'll run on just about any POSIX compliant OS available I have the libraries - it on Linux, Solaris and Mac OS X run. It requires the Perl libraries of TK (Perl TK on Debian or Ubuntu) and X 11: Protocol (libx11-Protocol-Perl on Debian or Ubuntu), in addition to xterm and OpenSSH.

Installation

ClusterSSH install on a Debian or Ubuntu system, is trivial - a simple sudo apt-get install ClusterSSh will install it and its dependencies. It is packaged for use with Fedora and is installable via the FreeBSD ports system. There is also a MacPorts version for use with Mac OS X if you use an Apple computer. Of course you can compile from source.

Configuration

ClusterSSH can be configured via its global - etc/clusters or about a file in the users home directory is. csshrc. I tend to favor user level configuration, how, who can choose more than one person who set up your ClusterSSH client on the same system as you. Configuration is easy in any case, as the file format is the same. ClusterSSH defines "Cluster" as a group of computers that want to control via an interface. In this sense your cluster at the top of the file in a "Cluster" block list and describe any cluster in a separate section below.

For example, say I have two clusters, each consisting of two machines. "Slave" has the machines "test1" and "test2" it and "cluster2" machines "test3" and "9" in it. Which



View the Original article