Menu

Thursday 13 April 2017

How to Start and Stop JBOSS using script method in LINUX



Step 1 : Go to JBOSS bin directory
       cd    /JBOSS/jboss-eap-7.0/bin


Step 2:  Make startjboss.sh file using touch OR vi

   touch startjboss.sh

        OR

   vi startjboss.sh


Step 3:  Add this line in startjboss.sh file
./standalone.sh  >> nohup.out  &


Note : remember to give permission
    chmod 755 startjboss.sh



Step 4: Now again make another stopjboss.sh file using touch OR vi

  touch stopjboss.sh

OR

vi stopjboss.sh

Step 5: Add this line in stopjboss.sh file

./jboss-cli.sh --connect ":shutdown" >> nohup_stopjboss.out &

OR



./jboss-cli.sh --connect --controller=192.168.0.22:9990 --user=jboss --password=jboss123 :shutdown  >> nohup_stopjboss.out file





Note : remember to give permission
             chmod 755 stopjboss.sh


Step 6: Start the JBOSS using startjboss.sh and check the output in      
nohup.out file


Step : Stop the JBOSS using stopjboss.sh file and check the output in

nohup_stopjboss.out file







1 comment: