Mohan1289
October 20th, 2012, 09:41 AM
Hi friends
i wanna write a script which helps my friends
but i am getting lot of complications though to me it looks little easy but not
in our company my colleges are developing various applications and deploying them Manually
1. First they are creating a project.war.zip file in windows using NET BEANS
2. Then they are Deploying them in CENT OS using FileZilla
3.Then they Move .war file to /root/jboss-4.0.5GA/server/default/deploy
4. Service jboss stop and check for processes using ps ax | grep jboss
5. if it shows more than one process then kill the remaining processes except jboss
6. service start jboss
7. serverlogs:
tail -f /root/jboss-4.0.5GA/server/default/log/serverloghttps://mail.google.com/mail/u/0/images/cleardot.gif
8. import the Database Structure
what i wanna do is
if i write a script and run it after downloading or uploading the package it should do all the above processes automatically.
No manual work should be done..
How can i do this?? any suggestions??
Based on this i developed an algorithm
After the package is uploaded from Windows to Linux Server using FileZilla client
1. Check weather the user has installation permissions (but i don't know how?? Can we give installation permissions to a normal user without adding him to the sudo group?? which is in "/etc/group" file)
2. if not echo Authentication Failure
3. else proceed
4. unzip the "project.war.zip" file and move it to the /root/jboss-4.0.5GA/server/default/deploy folder
5. the stop the jboss server
6. check weather there is a single process after the jboss is stopeed using ps ax | grep jboss
7. If the process is just jboss and nothing else start the Jboss server again
7. else kill all the processes except Jboss and start the server again
8. serverlogs:
tail -f /root/jboss-4.0.5GA/server/default/log/serverloghttps://mail.google.com/mail/u/0/images/cleardot.gif
9. then connect to database and import Database structure using mysql -u root -p passsword > .sql
Can you help me how to check weather there is a single process named jboss and nothing else??
how can i kill all processes except jboss??
Do i need sudo permissions to kill a process??
are there any flaws in my algorithm??
any corrections?? mistakes??
i wanna write a script which helps my friends
but i am getting lot of complications though to me it looks little easy but not
in our company my colleges are developing various applications and deploying them Manually
1. First they are creating a project.war.zip file in windows using NET BEANS
2. Then they are Deploying them in CENT OS using FileZilla
3.Then they Move .war file to /root/jboss-4.0.5GA/server/default/deploy
4. Service jboss stop and check for processes using ps ax | grep jboss
5. if it shows more than one process then kill the remaining processes except jboss
6. service start jboss
7. serverlogs:
tail -f /root/jboss-4.0.5GA/server/default/log/serverloghttps://mail.google.com/mail/u/0/images/cleardot.gif
8. import the Database Structure
what i wanna do is
if i write a script and run it after downloading or uploading the package it should do all the above processes automatically.
No manual work should be done..
How can i do this?? any suggestions??
Based on this i developed an algorithm
After the package is uploaded from Windows to Linux Server using FileZilla client
1. Check weather the user has installation permissions (but i don't know how?? Can we give installation permissions to a normal user without adding him to the sudo group?? which is in "/etc/group" file)
2. if not echo Authentication Failure
3. else proceed
4. unzip the "project.war.zip" file and move it to the /root/jboss-4.0.5GA/server/default/deploy folder
5. the stop the jboss server
6. check weather there is a single process after the jboss is stopeed using ps ax | grep jboss
7. If the process is just jboss and nothing else start the Jboss server again
7. else kill all the processes except Jboss and start the server again
8. serverlogs:
tail -f /root/jboss-4.0.5GA/server/default/log/serverloghttps://mail.google.com/mail/u/0/images/cleardot.gif
9. then connect to database and import Database structure using mysql -u root -p passsword > .sql
Can you help me how to check weather there is a single process named jboss and nothing else??
how can i kill all processes except jboss??
Do i need sudo permissions to kill a process??
are there any flaws in my algorithm??
any corrections?? mistakes??