CentOS Linux Next tomcat stop, view log shell script

Source: Internet
Author: User

The Tomcat installation directory for CentOS:/usr/local/tomcat

VI mytomcatuitl.sh creating files
chmod u+x mytomcatutil.sh Assignment Execution permissions

Shell script:

1#!/bin/Bash2 3 # tomcat Start, stop, log display script4 5 if[ $1=="']; Then6         Echo "please take one parameter to execute the command: Start start tomcat,stop stop tomcat, logs view Tomcat dynamic log"7Exit08 fi9 Ten if[ $1=='Start']; Then Onecd/usr/local/tomcat/bin A./startup.SH - elif[ $1=='Stop']; Then -cd/usr/local/tomcat/bin the./shutdown.SH - elif[ $1=='logs']; Then -cd/usr/local/tomcat/logs -         Tail-F catalina.out + Else -         Echo "The parameter is not correct! Start start, stop stop, logs view log" + fi

CentOS Linux Next tomcat stop, view log shell script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.