• Linux下安装tomcat9


    Linux下安装tomcat9

    一、下载tomcat9

    1.1 官网下载

      Tomcat官网下载对应版本的tar.gz文件,然后上传到linux服务器。

    1.2 wget下载

      地址可能不能使用,需要重新找。

    wget  http://mirrors.cnnic.cn/apache/tomcat/tomcat-9/v9.0.0.M9/bin/apache-tomcat-9.0.0.M9.tar.gz
    

    二、解压

    1. 用tar命令解压后,会生成apache-tomcat-9.0.0.M9目录;
    2. 把apache-tomcat-9.0.0.M9移动到/usr/local目录下
    tar -zxvf apache-tomcat-9.0.27.tar.gz
    mv apache-tomcat-9.0.27 /usr/local
    

    三、Tomcat服务相关

    1、进入解压目录的bin文件夹,运行命令./startup.sh

    ./startup.sh
    

    会自动输出下面内容:

    Using CATALINA_BASE:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_HOME:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_TMPDIR: /usr/local/apache-tomcat-9.0.27/temp
    Using JRE_HOME:        /usr/local/jdk1.8/jre
    Using CLASSPATH:       /usr/local/apache-tomcat-9.0.27/bin/bootstrap.jar:/usr/local/apache-tomcat-9.0.27/bin/tomcat-juli.jar
    

    2、验证是否成功开启
      在浏览器输入http://127.0.0.1:8080 ,或者使用命令w3m http://127.0.0.1:8080(w3m命令没有的话,请使用apt-get或者yum安装,具体请百度)

    w3m http://127.0.0.1:8080
    

    3、关闭服务
      进入解压目录的bin文件夹,运行命令./shutdowm.sh

    ./shutdowm.sh
    

    会自动输出下面内容:

    Using CATALINA_BASE:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_HOME:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_TMPDIR: /usr/local/apache-tomcat-9.0.27/temp
    Using JRE_HOME:        /usr/local/jdk1.8/jre
    Using CLASSPATH:       /usr/local/apache-tomcat-9.0.27/bin/bootstrap.jar:/usr/local/apache-tomcat-9.0.27/bin/tomcat-juli.jar
    

    4、查看tomcat版本
      进入解压目录的bin文件夹,运行命令./version.sh

    ./version.sh
    

    会自动输出下面内容:

    Using CATALINA_BASE:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_HOME:   /usr/local/apache-tomcat-9.0.27
    Using CATALINA_TMPDIR: /usr/local/apache-tomcat-9.0.27/temp
    Using JRE_HOME:        /usr/local/jdk1.8/jre
    Using CLASSPATH:       /usr/local/apache-tomcat-9.0.27/bin/bootstrap.jar:/usr/local/apache-tomcat-9.0.27/bin/tomcat-juli.jar
    Server version: Apache Tomcat/9.0.27
    Server built:   Oct 7 2019 09:57:22 UTC
    Server number:  9.0.27.0
    OS Name:        Linux
    OS Version:     3.10.0-957.21.3.el7.x86_64
    Architecture:   amd64
    JVM Version:    1.8.0_131-b11
    JVM Vendor:     Oracle Corporation
    
    
  • 相关阅读:
    获取request错误信息
    request error: Connection aborted.', error(113, 'No route to host')
    python yield
    mysql 2003: Can't connect to MySQL server on '127.0.0.1:3306' (99)
    top查看特定pid
    Producer-consumer problem in Python
    ubuntu16.04 安装opencv3.3
    ubuntu 安装MySQLdb
    ElasticSearch mapping
    ubuntu 安装qq方案
  • 原文地址:https://www.cnblogs.com/zt19994/p/13358918.html
Copyright © 2020-2023  润新知