How To Install clusterssh on Cygwin
ClusterSSH is just one of those handy tools for making changes to many servers at once. A very nice tool for a systems administrator to have. If you are in an enterprise situation where your system is a Windows system and you maintain Linux / Unix systems you ave a few options to manage your systems like VirtualBox, Cygwin, puTTy and many more. Of the ones I mentioned only VirtualBox and Cygwin are ones that ClusterSSH is a option to run.
Cygwin does not have a package available so it must be compiled and installed.
First make sure to install Cygwin. If you have Cygwin installed then there are several other packages you need to install.
clusterssh requires X11, tcl-Tk and a few perl packages
Start Cygwin setup.exe and select the following. Note vim is not needed you can install nano or any other editor.
- Archive/unzip
- web/wget
- net/ncftp
- utils/gnupg
- Devel/gcc-core
- Devel/binutils
- Devel/make
- Devel/patchutils
- X11/xorg-server
- X11/tcl-tk
- X11/xinit
- X11/xlaunch
- Editors/vim
- Perl/perl-Tk
CPAN modules install
First start an X11 Server session. Since we installed X-start-menu-icons you will have a shortcut under All Programs>Cygwin-X called XWin Server. Click on it to start it or open a Run or command prompt and type C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe.
The Xserver will start and it will also load a xterm session which you can close.
Open a Cygwin Terminal session and type the following commands:
cpan X11::Protocol cpan X11::Protocol::WM module cpan Exception::Class cpan Try::Tiny cpan Readonly cpan Test::DistManifest cpan Test::Trap
If you have never used cpan a configuration and update wizard will run first. If you accept the default and press enter it will configure it all for you. Once that is done and X11::Protocol starts a test X11 window will popup. Just click in the window to close it and the installation will complete.
ClusterSSH Install
Now we are ready to download App-ClusterSSH-4.09.tar.gz
Download 4.09 from http://sourceforge.net/projects/clusterssh/files/2.%20ClusterSSH%20Series%204/
Extract the file change to the extracted directory and type
$ tar -xvzf App-ClusterSSH-4.09.tar.gz
To install this module, run the following commands:
perl Build.PL ./Build ./Build test ./Build install
Now you are ready to go. Open an xterm window and start using ClusterSSH!
24 Responses to “How To Install clusterssh on Cygwin”
Trackbacks/Pingbacks
- [ cssh ] clusterssh for (ubuntu or Windows + cygwin ) | dsin - […] : http://lifeofageekadmin.com/how-to-install-clusterssh-on-cygwin/ […]
I have completed all of your steps, is there anything I need to do from there in order to get the clusterssh going? I started an xterm but it was just one window, are there a few more steps that I’m missing?
running cygwin on windows 7 btw.
In the xterm window type cssh server1 server2. server1 and server2 to be replaced with your server names.
Okay, that seemed to try to start the sessions. Do I need to setup a host file with the servers I am trying to get to or should I just use the IP of the servers that I am trying to reach? Thank you for your assistance.
If it cannot resolve the name you will need a host file entry or access them by ip.
Yes I have a host file, where would I place that? I am guessing in the cygwin folder somewhere?
Perfect one.
Achieved what it says.
Test::Differences needs to be installed too…
But then:
$ ./Build
Building App-ClusterSSH
./Build: blib/lib/App/ClusterSSH.pm: cannot resolve L in paragraph 335.
./Build: blib/lib/App/ClusterSSH.pm: unterminated list(s) at =head in paragraph 383. ignoring.
And even worse!
./Build test
# Looks like you failed 1 test of 150.
t/15config.t …… Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/150 subtests
….
# Failed test ‘The thing isa App::ClusterSSH::Exception::Cluster’
# at t/30cluster.t line 46.
# The thing isn’t defined
# Failed test ‘Error on reading an existing file ok’
# at t/30cluster.t line 47.
# got: undef
# expected: ‘Unable to read file /home/shrade0/App-ClusterSSH-4.01_01/t/30cluster.cannot_read: Permission denied’
# Looks like you failed 2 tests of 12.
t/30cluster.t ….. Dubious, test returned 2 (wstat 512, 0x200)
…
t/manifest.t …… 1/4 # Distribution files are missing in MANIFEST:
# pod2htmi.tmp
# pod2htmd.tmp
# Failed test ‘All files are listed in MANIFEST or skipped’
# at t/manifest.t line 11.
# Looks like you failed 1 test of 4.
t/manifest.t …… Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
t/pod-coverage.t .. ok
t/pod.t ……….. ok
Test Summary Report
——————-
t/15config.t (Wstat: 256 Tests: 150 Failed: 1)
Failed test: 149
Non-zero exit status: 1
t/30cluster.t (Wstat: 512 Tests: 12 Failed: 2)
Failed tests: 7-8
Non-zero exit status: 2
t/boilerplate.t (Wstat: 0 Tests: 3 Failed: 0)
TODO passed: 1-3
t/manifest.t (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 2
Non-zero exit status: 1
Files=12, Tests=588, 20 wallclock secs ( 0.20 usr 0.11 sys + 1.97 cusr 3.42 csys = 5.71 CPU)
Result: FAIL
Failed 3/12 test programs. 4/588 subtests failed.
🙁
I choose to ignore the errors and it seems to work nonetheless.
I have a german keyborad and some characters don’t reach the shell windows, when I enter them into the control window. Most notably: @ and ^.
Anyone any idea how to solve this?
I wish I could help you out but I am not familiar with the German keyboard, so I don’t have a suggestion for you on a work around.
Sorry! Wrong information! I can TYPE @ but I can’t paste it to the Control window.
^ can’t be typed 🙁
Awesome. Thanks!!
after install i got this result
matson@matsonkepson ~/App-ClusterSSH-4.01_01
$ cssh
Can’t locate X11/Protocol.pm in @INC (@INC contains: /usr/local/bin/../lib /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/site_perl/5.14 /usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/i686-cygwin-threads-64int /usr/lib/perl5/5.14 /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 .) at /usr/lib/perl5/site_perl/5.14/App/ClusterSSH.pm line 29.
BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.14/App/ClusterSSH.pm line 29.
Compilation failed in require at /usr/local/bin/cssh line 10.
BEGIN failed–compilation aborted at /usr/local/bin/cssh line 10.
i solved problem by myself
wget http://search.cpan.org/CPAN/authors/id/S/SM/SMCCAM/X11-Protocol-0.56.tar.gz
tar -xvzf X11-Protocol-0.56.tar.gz
perl Makefile.PL
make
make install
apt-cyg install openssh
startxwin
and after xwin server will start then we will type cssh
Enjoy 😀
you may have to change the perl lib location: http://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations
To install the newest version (4.02_04) of ClusterSSH, you also need to run:
cpan CPAN::Changes
Thank you. This was very helpful as I needed a refresher getting cssh installed again on Cygwin.
Cheers,
-swinful
Great article! Still works. Thanks for maintaining this page. Got it setup on my Surface Pro 3.
Also need to install
cpan Module::Build
cpan File::Slurp
cpan File::Which
cpan Test::PerlTidy
cpan Test::Pod
cpan Test::Pod::Coverage
Thanks for the additional libraries.
Just a quick note, the X11/X-start-menu-icons has been deprecated and is no longer able to be installed. Now you need to install X11/xinit to get the startxwin script and other goodies.
Thanks for the update!
I had mine working for quite a while until an update broke it, now i tried rebuilding a later version of cssh and it failed .I guess what i should be asking is ,is there a way to upgrade the clusterssh itself using perl from App-ClusterSSH-4.07 to version 4.10, i can see a tidy_changelog folder in the C:/cygwin64/usr/local/bin directory and if not, should i uninstall the current version first ?
Thank you!
Very useful tutorial.