I am trying to automate these steps so that I don't need to do this on every machines manually. I need to install latest app server software (abc.tar.gz) on all the unix boxes.
I need to do this in around 12 machines - "machine1" ... "machine12". I have a master machine "machine0" which has abc.tar.gz file so I was thinking to run my script from this machine only and install abc.tar.gz software by following below steps in all those 12 machines one by one. My unix account id is david and my process runs as golden user.
This is the steps I follow if I am installing abc.tar.gz in "machine1":
david@machine1:~$ sudo scp david@machine0:/home/david/abc.tar.gz .
david@machine1:~$ sudo stop test_server
david@machine1:~$ sudo su - golden
golden@machine1:~$ cd /opt/process
golden@machine1:/opt/process$ rm -rf *
golden@machine1:/opt/process$ exit
david@machine1:~$ sudo cp abc.tar.gz /opt/process
david@machine1:~$ sudo chown -R golden /opt/process
david@machine1:~$ sudo su - golden
golden@machine1:~$ cd /opt/process
golden@machine1:/opt/process$ tar -xvzf abc.tar.gz
golden@machine1:/opt/process$ exit
david@machine1:~$ sudo start test_server
How can I automate this so that it can do the same steps in all 12 machines one bye one? I mean install abc.tar.gz in machine1 first, then install on machine2 and go on.. I want to run this script from machine0 only.
Is there any way to automate this?