Find the answer to your Linux question:
Results 1 to 3 of 3
Dear all, Please recommend some methods of: -Deploy some files -Execute some scripts as root in few hundred servers. Just can't think of the best way of doing it. These ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    17

    Central management

    Dear all,

    Please recommend some methods of:

    -Deploy some files
    -Execute some scripts as root

    in few hundred servers. Just can't think of the best way of doing it. These are RHEL servers but we have different releases.

    Thanks in advance.

  2. #2
    Linux Newbie rituraj.goswami's Avatar
    Join Date
    Aug 2008
    Location
    Guwahati
    Posts
    133
    well,welcome.
    please tellus if the files you want to deploy are script ot anything else.
    There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.

  3. #3
    Just Joined! jaysunn's Avatar
    Join Date
    Apr 2009
    Location
    New York City - USA
    Posts
    18
    You can create a for loop.

    Code:
    #!/bin/bash
    
    for server in "server1" "server2" "server3" "server4" "server5" ; do
    
    ssh $server /usr/local/apache/bin/apachectl graceful
    
    done
    You will need to set up ssh keys on the servers. Have one server become the master and then add the public ssh keys to the clients. Of course you can alter the command that I showed to whatever.

    Hope this helps
    Jaysunn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...