1. Linux System Environment Information
[Email protected] ~]# cat/etc/redhat-release
Red Hat Enterprise Linux Server Release 5.4 (Tikanga)
[Email protected] home]# uname-a
Linux softtest 2.6.18-164.el5 #1 SMP Tue 15:51:48 EDT x86_64 x86_64 x86_64 gnu/linux
2. Tomcat and JDK versions were
[Email protected] application]# ls-ld apache-tomcat-7.0.70
Drwxr-xr-x 9 root root 4096 17:55 apache-tomcat-7.0.70
[Email protected] application]# ls-ld jdk1.7.0_79/
Drwxr-xr-x 8 root root 4096 Apr jdk1.7.0_79/
#下述两个软连接如果仅用于测试, it doesn't have to be built, I'm in the test environment deployment and need to do it for the time being.
#建立了apache-tomcat-7.0.70 Soft Connect to the/home directory.
[Email protected] home]# ls-l/home/tomcat_jycpsmis
lrwxrwxrwx 1 root root 17:57 /home/tomcat_jycpsmis -/application/apache-tomcat-7.0.70
#建立了jdk1.7.0_79 Soft-Connect to the/application directory.
[Email protected] application]# ls-l/APPLICATION/JDK
lrwxrwxrwx 1 root 17:51 /application/jdk -/application/jdk1.7.0_79/
3. Modify the catalina.sh file under the/home/tomcat_jycpsmis/bin directory.
#修改前记得备份
I'm in the content of this file
# OS specific support. $var _must_ is set to either true or false.
Add the following, note that the following is the soft link path:
Export JAVA_HOME=/APPLICATION/JDK
Export JRE_HOME=/APPLICATION/JDK/JRE
4, the war package through the rz-y command to upload to/home/tomcat_jycpsmis/webapps
5. Start the corresponding Tomcat and view the logs, for example, the log contents are:
[Email protected] bin]#/bin/sh/home/tomcat_jycpsmis/bin/startup.sh >/dev/null 2>&1
[Email protected] jdk]# tailf/home/tomcat_jycpsmis/logs/catalina.out
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:server version: Apache tomcat/7.0.70
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:server Built:jun 16:27:45 UTC
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:server number:7.0.70.0
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:os Name:linux
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:os Version:2.6.18-164.el5
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
INFO:Architecture:amd64
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:java Home: /application/jdk1.7.0_79/jre
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
INFO:JVM Version:1.7.0_79-b15
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
INFO:JVM vendor:oracle Corporation
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:catalina_base:/home/tomcat_jycpsmis
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:catalina_home:/home/tomcat_jycpsmis
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:command line argument:-djava.util.logging.config.file=/home/tomcat_jycpsmis/conf/logging.properties
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:command line argument:-djava.util.logging.manager=org.apache.juli.classloaderlogmanager
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
Info:command line argument:-djdk.tls.ephemeraldhkeysize=2048
6:15:16 PM Org.apache.catalina.startup.VersionLoggerListener Log
"/home/tomcat_jycpsmis/logs/catalina.out" 91L, 7183C 2,1 Top
Info:created System Preferences directory in Java.home.
6:15:22 PM java.util.prefs.filesystempreferences$6 Run
Warning:prefs file removed in Background/root/.java/.userprefs/prefs.xml
6:15:22 PM java.util.prefs.filesystempreferences$6 Run
Warning:prefs file removed in Background/application/jdk1.7.0_79/jre/.systemprefs/prefs.xml
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deployment of Web application Directory/application/apache-tomcat-7.0.70/webapps/jy-cps-mis have finished in 10,869 ms
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deploying Web Application Directory/application/apache-tomcat-7.0.70/webapps/examples
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deployment of Web application directory/application/apache-tomcat-7.0.70/webapps/examples have finished in 203 ms
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deploying Web Application Directory/application/apache-tomcat-7.0.70/webapps/manager
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deployment of Web application Directory/application/apache-tomcat-7.0.70/webapps/manager have finished in
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deploying Web Application Directory/application/apache-tomcat-7.0.70/webapps/root
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deployment of Web application directory/application/apache-tomcat-7.0.70/webapps/root have finished in
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deploying Web Application Directory/application/apache-tomcat-7.0.70/webapps/docs
6:15:28 PM Org.apache.catalina.startup.HostConfig deploydirectory
Info:deployment of Web application Directory/application/apache-tomcat-7.0.70/webapps/docs have finished in
6:15:28 PM Org.apache.coyote.AbstractProtocol Start
Info:starting Protocolhandler ["http-bio-8888"]
6:15:28 PM Org.apache.coyote.AbstractProtocol Start
Info:starting Protocolhandler ["ajp-bio-8009"]
6:15:28 PM Org.apache.catalina.startup.Catalina Start
Info:server Startup in 11842 MS
This article is from the "You can choose Extraordinary" blog, please be sure to keep this source http://ylcodes01.blog.51cto.com/5607366/1841639
Deploy Tomcat under Linux to specify JDK version to compile and run the Javaweb app