Create a Tomcat installation and startup script

Source: Internet
Author: User
Create a tomcat file in the directory. Etcinit. dvitomcat, the content is as follows :#! Binbash ## Startupscriptforthetomcat ## chkconfig: 3458015 # description: TomcatisaServlet + JSPEngine. # Sourcefunctionlibrary .. etcrc. dinit. dfunctionsRETVAL0checkjava (
  1. Create a newMcAt file.
  2. /Etc/init. d/vi tomCat, The content is as follows:
  3. #! /Bin/bash
  4. #
  5. # Startup scriptForThe tomcat
  6. #
  7. #Chkconfig:345 80 15
  8. # Description: Tomcat is a Servlet + JSP Engine.
  9. # Source fuNcTion library.
  10. ./Etc/rc. d/init. d/functions
  11. RETVAL =0
  12. Checkjava (){
  13. If[-Z\ "$ JAVA_HOME \"]; Then
  14. ExPort JAVA_HOME =/usr/java/jdk1.5. 0_15
  15. Fi
  16. }
  17. Start (){
  18. Checkjava
  19. Checkrun
  20. If[$ RETVAL-eq0]; Then
  21. Echo\ "Starting tomcat \"
  22. /Usr/tomcat/bin/startup. sh
  23. Touch/Var/lock/SuBsys/tomcat

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.