I have about a dozen Linux boxes that I occasionally need to run the same command(s) on. Is there an easier way (or automated way) to do this asides from logging on to each machine and running the command, one at a time? It's not the same commands all the time and it's not at a preset time so it's not something ideal for tools like cron.
|
|
|||
|
|
Hm, maybe pconsole is the tool you want. |
|||||
|
|
There's also ClusterSSH, which, well, does exactly what you think it does. Yay for descriptive naming! |
|||
|
|
|
You should check out Puppet here is a linux.com article on its setup and use |
|||||
|
|
You may try Capistrano. Originally it is a Rails deployment tool, but it grew to do many things with remote machines. For a more complete aproach to administration of multiple machine you may want to try Chef. |
||||
|
|
|
I guess I'll copy and paste my answer from Stack Overflow, which people seemed to like. . . The issue of how to run commands on many servers at once came up on a Perl mailing list the other day and I'll give the same recommendation I gave there, which is to use gsh: http://outflux.net/unix/software/gsh gsh is similar to the "
You can also combine or split ghost groups, using web+db or web-RHEL4, for example. I'll also mention that while I have never used shmux, its website contains a list of software (including gsh) that lets you run commands on many servers at once. Capistrano has already been mentioned and (from what I understand) could be on that list as well. |
|||
|
|
|
|
|||
|
|
|
Also take a look at func. Func lets you use a module architecture to control different aspects of a system, from dealing with packages, to running commands, etc. It works on a client/server module over SSL and has a fairly flexible authentication scheme as well. |
|||
|
|
You could also try |
|||||
|
|
Other tools are: RunDeck could also be descriped as the lightweight ControlTier. These tools not only give you a cluster shell, but also a web frontend and you can save your jobs for future use. |
|||
|
|
|
You can also try Cluster SSH (cssh). I haven't used it, but there's an article on LinuxJournal.com called "Manage Multiple Servers Efficiently" that talks about it. |
|||
|
|
|
If you are on a KDE desktop, konsole has the "Send Input to all sessions" option. It applies to all the sessions opened in the same konsole window. |
|||
|
|
|
Use dish, simple and very powerful ! This script changed my life :) One script to rule them all ! http://nic-nac-project.org/~drimiks/gnu/dish.shtml The diligence shell 'dish' executes commands via ssh/rsh/telnet/mysql simultaneously on several systems. Changing password, updating configuration, copying files, checking status, etc. on hundreds of nodes is made then simple. Dish is similar to the IBM's 'dsh' (distributed shell) but furthermore allows remote execution of commands requiring authentication. Compared to other open source packages which include a distributed shell (or similar tools) like ClusterIt, dancer's shell, parallel distributed shell, or C3, dish is a slim and easy to use remote-shell wrapper for cases where a flexible solution is needed. You can browse the dish's manual page on-line here. |
|||
|
|