Advertisement

05.27.2008 at 03:51PM PDT, ID: 23436612
[x]
Attachment Details

need linux shell script to automate application deployment

Asked by zenguru in Shell Scripting, Linux, Linux Administration

Tags: linux shell

Can you write Unix/linux shell  (bash) script and name it deploy so that when I type deploy inside the terminal on my local desktop pc (which is also linux -- fedora), the application is compiled and deployed to remote server. Assume log to remote server as root with password 'tptp6767' and ip address 123.123.123.123. Here are the sequence of commands that must run in the following order and a given command must complete before running the next command and also stop running the remaining commands if any command is not run successfully or throws error.

# these commands run locally
jvc clean
jvc prod war test.war
<login to remote server using ssh, cannot use telnet or ftp>
<upload ~/projects/test.war to remote server dir  /root/uploads>
# these are run on remote server
/etc/init.d/tomcat stop
rm -rf /usr/local/tomcat/webapps/ROOT/*
 cd /usr/local/tomcat/webapps/ROOT
jar -xvf /root/uploads/test.war
/etc/init.d/tomcat start


Start Free Trial
[+][-]05.27.2008 at 07:29PM PDT, ID: 21657310

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Shell Scripting, Linux, Linux Administration
Tags: linux shell
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 1
Solution Grade: C
 
 
[+][-]05.28.2008 at 06:04AM PDT, ID: 21659961

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.07.2008 at 02:46AM PDT, ID: 21734887

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628