码迷,mamicode.com
首页 > 其他好文 > 详细

TOMCAT-安装配置

时间:2015-03-11 12:26:07      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

0.下载:
  从官网上下载最新版的TOMCAT: http://tomcat.apache.org/download-60.cgi 找到相应的版本。
  根据电脑系统版本,我下载的是apache-tomcat-8.0.20-windows-x86.zip
  解压直接放到D盘下,目录为apache-tomcat-8.0.20

1.运行:
  找到D:\apache-tomcat-8.0.20\bin下的startup.bat 一闪即过,看不到相关的内容。
  用CMD来查看相关的信息提示:
    Microsoft Windows [版本 6.1.7600]
    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

    C:\Users\AN>d:

    D:\>cd apache-tomcat-8.0.20\bin

    D:\apache-tomcat-8.0.20\bin>startup.bat
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program
    D:\apache-tomcat-8.0.20\bin>


  以前电脑上已经安装好了JDK,并配置相关的环境变量。

2.配置:
  右键计算机--》属性----》高级系统设置---》进入环境变量
  在系统变量中,新建一下项目
  变量名:       对应变量值:
  JAVA_HOME    C:\Program Files\Java\jdk1.8.0_31
  JRE_HOME     C:\Program Files\Java\jre1.8.0_31


3.运行检测:
  在次用CMD来查看相关的信息提示:
    Microsoft Windows [版本 6.1.7600]
    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

    C:\Users\AN>d:

    D:\>cd apache-tomcat-8.0.20\bin

    D:\apache-tomcat-8.0.20\bin>startup.bat
    Using CATALINA_BASE: "D:\apache-tomcat-8.0.20"
    Using CATALINA_HOME: "D:\apache-tomcat-8.0.20"
    Using CATALINA_TMPDIR: "D:\apache-tomcat-8.0.20\temp"
    Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_31"
    Using CLASSPATH: "D:\apache-tomcat-8.0.20\bin\bootstrap.jar;D:\apache-tomcat-8.0.20\bin\tomcat-juli.jar"
    D:\apache-tomcat-8.0.20\bin>
  然后正常显示TOMCAT运行窗口:
11-Mar-2015 11:52:38.947 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.20
11-Mar-2015 11:52:38.949 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 15 2015 18:10:42 UTC
11-Mar-2015 11:52:38.950 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.20.0
11-Mar-2015 11:52:38.950 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
11-Mar-2015 11:52:38.950 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
11-Mar-2015 11:52:38.951 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86
11-Mar-2015 11:52:38.951 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jre1.8.0_31
11-Mar-2015 11:52:38.951 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_31-b13
11-Mar-2015 11:52:38.952 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
11-Mar-2015 11:52:38.952 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\apache-tomcat-8.0.20
11-Mar-2015 11:52:38.953 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\apache-tomcat-8.0.20
11-Mar-2015 11:52:38.953 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\apache-tomcat-8.0.20\conf\logging.properties
11-Mar-2015 11:52:38.954 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
11-Mar-2015 11:52:38.954 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.20\endorsed
11-Mar-2015 11:52:38.954 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\apache-tomcat-8.0.20
11-Mar-2015 11:52:38.955 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-8.0.20
11-Mar-2015 11:52:38.955 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-8.0.20\temp
11-Mar-2015 11:52:38.955 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
11-Mar-2015 11:52:38.956 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
11-Mar-2015 11:52:40.028 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)
11-Mar-2015 11:52:40.194 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
11-Mar-2015 11:52:40.217 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
11-Mar-2015 11:52:40.220 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1756 ms
11-Mar-2015 11:52:40.253 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
11-Mar-2015 11:52:40.254 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.20
11-Mar-2015 11:52:40.269 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.20\webapps\docs
11-Mar-2015 11:52:40.938 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [332] milliseconds.
11-Mar-2015 11:52:40.967 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.20\webapps\docs has finished in 699 ms
11-Mar-2015 11:52:40.968 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.20\webapps\examples
11-Mar-2015 11:52:41.530 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.20\webapps\examples has finished in 561 ms
11-Mar-2015 11:52:41.530 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.20\webapps\host-manager
11-Mar-2015 11:52:41.573 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.20\webapps\host-manager has finished in 42 ms
11-Mar-2015 11:52:41.575 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.20\webapps\manager
11-Mar-2015 11:52:41.614 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.20\webapps\manager has finished in 38 ms
11-Mar-2015 11:52:41.614 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\apache-tomcat-8.0.20\webapps\ROOT
11-Mar-2015 11:52:41.682 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\apache-tomcat-8.0.20\webapps\ROOT has finished in 68 ms
11-Mar-2015 11:52:41.687 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
11-Mar-2015 11:52:41.698 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
11-Mar-2015 11:52:41.700 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1479 ms

至此,java JDK和Tomcat环境配置完成
配置完成以后想确定是否配置成功,以下步骤
1检验java JDK是否配置成功
进入控制台 输入java 如果出现"java"不是内部或外部命令,也不是可运行的程序或批处理文件,说明没有配置成功。反之如果出现java相关的东西则说明成功。
2.检验Tomcat是否配置成功
进入到Tomcat的bin目录下,找到startup.bat,双击运行,如果一散而过,则可能未配置成功(进一步确定,在网页地址栏输入localhost:8080或者127.0.0.1:8080,若没有反应则表示没有配置成功),反之则配置成功

TOMCAT-安装配置

标签:

原文地址:http://www.cnblogs.com/lzhat/p/4329494.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!