Linux Setup tomcat boot up

Source: Internet
Author: User

[Email protected] ~]# cd/etc/rc.d/[email protected] rc.d]# Cat rc.local #!/bin/sh## This script would be executed*after*All the other init scripts.# You can put your own initialization stuffinchHereifYou don'T# Want to DoThe full Sys V style init Stuff.touch/var/Lock/subsys/local#./doc/redis-3.0.4/src/redis-server/doc/redis-3.0.4/redis.conf Export Java_home=/usr/local/java/jdk1.7.0/usr/local/tomcat/apache-tomcat-7.0. +/bin/startup.sh start[[email protected] rc.d]#
Parsing rc.local files
1. Configure Environment variables
Export Java_home=/usr/local/java/jdk1. 7.0 (JDK installation directory can be obtained with $echo $JAVA _home) Here's how my server looks for java_home environment variables [[email protected] rc.d]# $echo $JAVA _home-bash: /usr/local/java/jdk1. 7.0 is a directory
2. Configure the Tomcat path
/usr/local/tomcat/apache-tomcat-7.0.62/bin/startup.sh Start
This is the startup.sh location path of the Tomcat Web server plus start

3. Save the file
Press ESC and ENTER: Wq we've saved the rc.local input right now.

4. Modify the rc.local file to be executable, such as: chmod +x rc.local

5. Restart your server
Shutdown-r now

6. After the power-on login to execute
Ps-ef|grep Java
Value after the login whether there is a Java process if there is OK

[Email protected] rc.d]# ps-ef|grep java

Root 1102 1 0 16:19? 00:00:04/usr/local/java/jdk1.7.0/bin/java-djava.util.logging.config.file=/usr/local/tomcat/ Apache-tomcat-7.0.62/conf/logging.properties-djava.util.logging.manager=org.apache.juli.classloaderlogmanager- djava.endorsed.dirs=/usr/local/tomcat/apache-tomcat-7.0.62/endorsed-classpath/usr/local/tomcat/ Apache-tomcat-7.0.62/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-7.0.62/bin/tomcat-juli.jar- dcatalina.base=/usr/local/tomcat/apache-tomcat-7.0.62-dcatalina.home=/usr/local/tomcat/apache-tomcat-7.0.62- Djava.io.tmpdir=/usr/local/tomcat/apache-tomcat-7.0.62/temp org.apache.catalina.startup.Bootstrap start Start
Root 1187 1005 0 16:28 pts/1 00:00:00 grep java




Linux Setup tomcat boot up

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.