Redhat5.2 安装jdk6和tomcat7
软件准备:
[红帽企业.Linux.5].TLF-SOFT-RedHat.Enterprise.Linux.5.Update.2-XiSO.iso
jdk-6u22-linux-i586-rpm.bin
apache-tomcat-7.0.4.tar.gz or apache-tomcat-7.0.4-src.tar.gz

安装JDK之前检查,在redhat5企业版中默认安装了jdk1.4,需要卸载
[root@javasrv ~]# java --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@javasrv ~]# yum remove java
Loading "security" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115 set to be erased
--> Processing Dependency: java-gcj-compat for package: antlr
--> Processing Dependency: java-gcj-compat for package: antlr
--> Processing Dependency: java-gcj-compat >= 1.0.64 for package: gjdoc
--> Processing Dependency: java-gcj-compat >= 1.0.64 for package: gjdoc
--> Running transaction check
---> Package antlr.i386 0:2.7.6-4jpp.2 set to be erased
---> Package gjdoc.i386 0:0.7.7-12.el5 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
java-1.4.2-gcj-compat   i386       1.4.2.0-40jpp.115  installed          441
Removing for dependencies:
antlr                   i386       2.7.6-4jpp.2     installed         2.5 M
gjdoc                   i386       0.7.7-12.el5     installed         1.7 M

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       3 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing   : antlr                        ######################### [1/3]
  Erasing   : gjdoc                        ######################### [2/3]
  Erasing   : java-1.4.2-gcj-compat        ######################### [3/3]

Removed: java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115
Dependency Removed: antlr.i386 0:2.7.6-4jpp.2 gjdoc.i386 0:0.7.7-12.el5
Complete!
[root@javasrv ~]#
安装JDK环境,JDK6.0即java 1.6.0
[root@javasrv ~]# cd /usr/local/src
[root@javasrv src]# chmod 755 jdk-6u22-linux-i586-rpm.bin
[root@javasrv src]# ./jdk-6u22-linux-i586-rpm.bin //安装后生成目录/usr/java
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u22-linux-i586.rpm
  inflating: sun-javadb-common-10.5.3-0.2.i386.rpm
  inflating: sun-javadb-core-10.5.3-0.2.i386.rpm
  inflating: sun-javadb-client-10.5.3-0.2.i386.rpm
  inflating: sun-javadb-demo-10.5.3-0.2.i386.rpm
  inflating: sun-javadb-docs-10.5.3-0.2.i386.rpm
  inflating: sun-javadb-javadoc-10.5.3-0.2.i386.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
Preparing...                ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in
the JDK installation directory) in a browser.

For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....

Done.
[root@javasrv src]# ll /usr/java
total 4
lrwxrwxrwx 1 root root   16 Jul  3 19:26 default -> /usr/java/latest
drwxr-xr-x 9 root root 4096 Jul  3 19:26 jdk1.6.0_22
lrwxrwxrwx 1 root root   21 Jul  3 19:26 latest -> /usr/java/jdk1.6.0_22
配置环境变量
修改/etc/profile文件(系统级别有效)
[root@javasrv src]# vi /etc/profile
JAVA_HOME=/usr/java/default
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH

[root@javasrv src]# source /etc/profile
[root@javasrv src]# java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
修改.bashrc文件(当前用户有效)
[root@javasrv src]# vi ~/.bashrc
JAVA_HOME=/usr/java/default
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH
验证java环境
[root@javasrv src]# more HelloWorld.java
/* HelloWorld.java */
public class HelloWorld {
public static void main(String arg[]) {
System.out.println("Hello, World!");
}
}
[root@javasrv src]# javac HelloWorld.java
编译生成的“HelloWorld.class”
[root@javasrv src]# java HelloWorld //没有扩展名
Hello, World!
命令执行成功

安装apache-tomcat-7.0.4.tar.gz
[root@javasrv src]# tar zxvf apache-tomcat-7.0.4.tar.gz
[root@javasrv src]# mv apache-tomcat-7.0.4 /usr/local/
[root@javasrv src]# cd ..
[root@javasrv local]# ln -s apache-tomcat-7.0.4/ tomcat
[root@javasrv local]# /usr/local/tomcat/bin/startup.sh //启动tomcat
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
使用浏览器访问 http://localhost:8080/,出现tomcat默认页面,说明已经安装成功。
停用tomcat
[root@javasrv local]# /usr/local/tomcat/bin/shutdown.sh

通过源码编译安装apache-tomcat-7.0.4-src.tar.gz
首先需要安装Ant

下载地址:http://www.apache.org/dist/ant/binaries/
Install Apache Ant 1.8.x on your computer
wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.2-bin.tar.bz2
[root@javasrv src]# tar jxvf apache-ant-1.8.2-bin.tar.bz2
[root@javasrv src]# cd /usr/local
[root@javasrv local]# ln -s /usr/local/src/apache-ant-1.8.2/ ant
[root@javasrv local]# cd ~
[root@javasrv ~]# more /etc/profile
ANT_HOME=/usr/local/ant
JAVA_HOME=/usr/java/default
PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$ANT_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH
[root@javasrv ~]# . /etc/profile
[root@javasrv ~]# ant
Buildfile: build.xml does not exist!
Build failed
执行ant 后,如果不指定配置文件ant会缺省找build.xml这个配置文件
[root@javasrv ~]# ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
有这个输出就说明ant安装成功了
//ant安装完成
ant的常用命令
ant
ant javadoc
ant extras
ant release
############################################
ant简单示例
[root@javasrv src]# mkdir -p hello-ant/build/classes
[root@javasrv src]# mkdir -p hello-ant/src/main/hello/ant
在hello-ant/src/main/hello/ant/目录下新建HelloAnt.java文件
package hello.ant;
public class HelloAnt{
    public static void main(String[] args){
        System.out.println("hello ant");
        }  
}
在hello-ant/下新建build.xml文件
<?xml version= "1.0" encoding= "GB2312" ?>

<!--   a project,consist of many task group(target)   -->
<project   default= "main"   basedir= ".">

        <!--   one task group in a project,Can contain many tasks(task:javac,java...)   -->
        <target   name= "main">
                <!--build-->
                <javac   srcdir= "src\main\hello\ant"   destdir= "build\classes"/>
                <!--run-->
                <java   classname= "hello.ant.HelloAnt">
                        <classpath>
                                <pathelement   path= "build\classes"/>
                        </classpath>
                </java>
        </target>

</project>

运行ant
进入build.xml所在目录
[root@javasrv src]# cd /usr/local/src/hello-ant/
[root@javasrv hello-ant]# ant -file build.xml
Buildfile: /usr/local/src/hello-ant/build.xml

main:
    [javac] /usr/local/src/hello-ant/build.xml:9: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to /usr/local/src/hello-ant/build/classes
     [java] hello ant

BUILD SUCCESSFUL
Total time: 1 second
运行完之后,在build/classes目录下,出现了编译过的文件HelloAnt.class:
build/classes/hello/ant/HelloAnt.class.
######################################################

编译Tomcat
[root@javasrv src]# tar zxvf apache-tomcat-7.0.4-src.tar.gz
[root@javasrv src]# mv apache-tomcat-7.0.4-src /usr/local/
[root@javasrv src]# cd ..
[root@javasrv local]# ln -s apache-tomcat-7.0.4-src/ tomcat
[root@javasrv local]# cd tomcat
[root@javasrv tomcat]# ant
Buildfile: /usr/local/apache-tomcat-7.0.4-src/build.xml

build-prepare:
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/classes
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/bin
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/conf
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/lib
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/logs
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/temp
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/webapps

download-compile:

proxyflags:

setproxy:

testexist:
     [echo] Testing  for /usr/share/java/tomcat-native-1.1.20/tomcat-native.tar.gz

downloadfile:
    [mkdir] Created dir: /usr/share/java/tomcat-native-1.1.20
      [get] Getting: http://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.1.20/source/tomcat-native-1.1.20-src.tar.gz
      [get] To: /usr/share/java/tomcat-native-1.1.20/tomcat-native.tar.gz
proxyflags:

setproxy:

testexist:
     [echo] Testing  for /usr/share/java/commons-daemon-1.0.3/commons-daemon-1.0                                     .3.jar

downloadgz:
      [get] Getting: http://archive.apache.org/dist/commons/daemon/binaries/1.0.                                     3/commons-daemon-1.0.3-bin.tar.gz
      [get] To: /usr/share/java/file.tar.gz
   [gunzip] Expanding /usr/share/java/file.tar.gz to /usr/share/java/file.tar
    [untar] Expanding: /usr/share/java/file.tar into /usr/share/java
   [delete] Deleting: /usr/share/java/file.tar
   [delete] Deleting: /usr/share/java/file.tar.gz

proxyflags:

setproxy:

testexist:
     [echo] Testing  for /usr/share/java/commons-daemon-1.0.3/commons-daemon-1.0                                     .3-native-src.tar.gz

downloadfile:
      [get] Getting: http://archive.apache.org/dist/commons/daemon/source/common                                     s-daemon-1.0.3-native-src.tar.gz
      [get] To: /usr/share/java/commons-daemon-1.0.3/commons-daemon-1.0.3-native                                     -src.tar.gz

proxyflags:

setproxy:

testexist:
     [echo] Testing  for /usr/share/java/commons-pool-1.5.5-src/build.xml

downloadgz:
      [get] Getting: http://archive.apache.org/dist/commons/pool/source/commons-                                     pool-1.5.5-src.tar.gz
      [get] To: /usr/share/java/file.tar.gz
   [gunzip] Expanding /usr/share/java/file.tar.gz to /usr/share/java/file.tar
    [untar] Expanding: /usr/share/java/file.tar into /usr/share/java
   [delete] Deleting: /usr/share/java/file.tar
   [delete] Deleting: /usr/share/java/file.tar.gz

proxyflags:

setproxy:

testexist:
     [echo] Testing  for /usr/share/java/commons-dbcp-1.4-src/build.xml

downloadgz:
      [get] Getting: http://archive.apache.org/dist/commons/dbcp/source/commons-                                     dbcp-1.4-src.tar.gz
      [get] To: /usr/share/java/file.tar.gz
   [gunzip] Expanding /usr/share/java/file.tar.gz to /usr/share/java/file.tar
    [untar] Expanding: /usr/share/java/file.tar into /usr/share/java
   [delete] Deleting: /usr/share/java/file.tar
   [delete] Deleting: /usr/share/java/file.tar.gz
    [mkdir] Created dir: /usr/share/java/tomcat7-deps/dbcp

build-prepare:
   [delete] Deleting directory /usr/local/apache-tomcat-7.0.4-src/output/build/t                                     emp
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/build/temp

build-manifests:
    [mkdir] Created dir: /usr/local/apache-tomcat-7.0.4-src/output/manifests
     [copy] Copying 12 files to /usr/local/apache-tomcat-7.0.4-src/output/manife                                     sts

build-tomcat-dbcp:
     [copy] Copying 68 files to /usr/share/java/tomcat7-deps/dbcp
    [mkdir] Created dir: /usr/share/java/tomcat7-deps/dbcp/src/java/org/apache/t                                     omcat/dbcp
     [move] Moving 64 files to /usr/share/java/tomcat7-deps/dbcp/src/java/org/ap                                     ache/tomcat/dbcp
    [mkdir] Created dir: /usr/share/java/tomcat7-deps/dbcp/classes
    [javac] Compiling 64 source files to /usr/share/java/tomcat7-deps/dbcp/class                                     es
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
      [jar] Building jar: /usr/share/java/tomcat7-deps/dbcp/tomcat-dbcp.jar
      [jar] Building jar: /usr/share/java/tomcat7-deps/dbcp/tomcat-dbcp-src.jar

testexist:
     [echo] Testing  for /usr/share/java/ecj-3.6/ecj-3.6.jar

downloadfile-2:
    [mkdir] Created dir: /usr/share/java/ecj-3.6

proxyflags:

setproxy:

trydownload.check:

trydownload:
      [get] Getting: http://archive.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/ecj-3.6.jar
      [get] To: /usr/share/java/ecj-3.6/ecj-3.6.jar
................
deploy:
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/bin
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/bin
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/bin
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/bin
     [copy] Copying 16 files to /usr/local/apache-tomcat-7.0.4-src/output/build/bin
     [copy] Copying 7 files to /usr/local/apache-tomcat-7.0.4-src/output/build/conf
     [copy] Copying 224 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/ROOT
    [javac] Compiling 50 source files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/WEB-INF/classes
    [javac] Compiling 1 source file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/plugin/applet

examples-sources:
[txt2html] Converted 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/simpletag
[txt2html] Converted 4 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/simpletag
[txt2html] Converted 5 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/simpletag
[txt2html] Converted 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/jspattribute
[txt2html] Converted 4 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/jspattribute
[txt2html] Converted 4 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/cal
[txt2html] Converted 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsptoserv
[txt2html] Converted 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/el
[txt2html] Converted 2 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/el
[txt2html] Converted 3 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/el
[txt2html] Converted 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/misc
[txt2html] Converted 4 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples/jsp/jsp2/tagfiles
[txt2html] Converted 51 files to /usr/local/apache-tomcat-7.0.4-src/output/build/webapps/examples
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/lib
     [copy] Copying 1 file to /usr/local/apache-tomcat-7.0.4-src/output/build/lib

BUILD SUCCESSFUL
Total time: 4 minutes 54 seconds

编译完成之后生成目录/usr/local/tomcat/output/build/
[root@javasrv local]# /usr/local/tomcat/output/build/bin/startup.sh //启动tomcat
[root@javasrv local]# ls /usr/local/tomcat/output/build/logs
如果生成了日志说明启动成功,有问题查看catalina.out

自动启动tomcat
第一种方法
添加/usr/local/tomcat/bin/startup.sh到/etc/rc.d/rc.local
[root@javasrv ~]# echo "/usr/local/tomcat/bin/startup.sh" &gt;&gt;/etc/rc.d/rc.local

第二种方法
使用Tomcat5.sh
生成jsvc
[root@javasrv tomcat]# cd /usr/local/tomcat/output/build/bin
[root@javasrv bin]# tar zxvf commons-daemon-native.tar.gz
[root@javasrv bin]# cd commons-daemon-1.0.3-native-src/
[root@javasrv commons-daemon-1.0.3-native-src]# cd unix/
[root@javasrv unix]# ./configure && make
[root@javasrv unix]# cp jsvc ../..
[root@javasrv unix]# cd ../..
[root@javasrv bin]# pwd
/usr/local/tomcat/output/build/bin
[root@javasrv bin]# cp ./commons-daemon-1.0.3-native-src/unix/native/Tomcat5.sh /etc/init.d/tomcat
[root@javasrv bin]# cd /etc/init.d
[root@javasrv init.d]# vi tomcat

Redhat5.2 安装jdk6和tomcat7_休闲

Redhat5.2 安装jdk6和tomcat7_ant_02

Redhat5.2 安装jdk6和tomcat7_休闲_03

Redhat5.2 安装jdk6和tomcat7_jdk_04

Redhat5.2 安装jdk6和tomcat7_休闲_05

如需使用debug、verbose,这两个开关放在紧随jsvc命令之后
增加如下两行
# chkconfig: 345 88 14 
# description: Tomcat Daemon
修改第35行
JAVA_HOME=/usr/java/default
CATALINA_HOME=/usr/local/tomcat
DAEMON_HOME=/usr/local/tomcat/bin
TOMCAT_USER=root
修改第43行
CATALINA_BASE=/usr/local/tomcat
第46-50行
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar:\
$CATALINA_HOME/bin/tomcat-juli.jar
$CATALINA_HOME/bin/tomcat-juli.jar //此处是重要之处,故障查找比较隐蔽,原文件少这一句,导致服务启动失败。
第57行修改
$DAEMON_HOME/jsvc \
第82行修改
$DAEMON_HOME/jsvc \
如果为了排错,可打开debug开关

tomcat文件修改完成之后,调整tomcat目录的符号链接
[root@javasrv local]# rm -rf tomcat
[root@javasrv local]# ln -s /usr/local/apache-tomcat-7.0.4-src/output/build/ tomcat
将tomcat加入到服务
[root@javasrv local]# chkconfig --add tomcat
[root@javasrv local]# chkconfig --list|grep tomcat
tomcat          0:off   1:off   2:off   3:on    4:on    5:on    6:off
tomcat的启动和关闭
[root@javasrv bin]# ./startup.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
[root@javasrv bin]# tail ../logs/catalina.out
Jul 4, 2011 1:41:41 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Jul 4, 2011 1:41:41 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Jul 4, 2011 1:41:41 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 4, 2011 1:41:41 AM org.apache.coyote.ajp.AjpProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Jul 4, 2011 1:41:41 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 467 ms
[root@javasrv bin]# ./shutdown.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
[root@javasrv bin]# tail ../logs/catalina.out
Jul 4, 2011 1:42:38 AM org.apache.coyote.http11.AbstractHttp11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jul 4, 2011 1:42:39 AM org.apache.coyote.ajp.AbstractAjpProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
Jul 4, 2011 1:42:39 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 4, 2011 1:42:39 AM org.apache.coyote.http11.AbstractHttp11Protocol stop
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jul 4, 2011 1:42:39 AM org.apache.coyote.ajp.AbstractAjpProtocol stop
INFO: Stopping Coyote AJP/1.3 on ajp-8009

[root@javasrv logs]# service tomcat start
[root@javasrv bin]# tail ../logs/catalina.out

附:无tomcat-juli.jar启动时的出错信息
07/11/2010 13:03:29 5711 jsvc.exec debug: redirecting stdout to /usr/local/tomcat/logs/catalina.out and stderr to &1
07/11/2010 13:03:29 5708 jsvc.exec debug: wait_child 5711
more /usr/local/tomcat/logs/catalina.out
07/11/2010 13:03:30 5712 jsvc.exec debug: Daemon loading...
java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
        at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:56)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:147)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 8 more
07/11/2010 13:03:30 5712 jsvc.exec error: Cannot load daemon
07/11/2010 13:03:30 5712 jsvc.exec debug: java_load failed
07/11/2010 13:03:30 5711 jsvc.exec error: Service exit with a return value of 3