Download and install TOMCAT

  1. Select the official website of the installation package https://tomcat.apache.org/download-70.cgi?Preferred=http%3A%2F%2Fmirror.bit.edu.cn%2Fapache%2F

  2. Select the appropriate mirror

  3. Right copy the link on the package needed

  4. LINUX by

    wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.tar.gz
  5. Decompression

    tar zxvf apache-tomcat-7.0.96.tar.gz
    
    ## 测试
    cd apache-tomcat-7.0.96/
    sh bin/startup.sh
    
    ## 访问8080端口看成功与否
    ## 关闭
    sh bin/shutdown.sh
    
  6. Configuration environment variable

    ## 查看当前路径
    pwd   
    ## 我的路径是/home/apache-tomcat-7.0.96
    
    ## 修改配置文件
    vim /etc/profile
    
    
    # 在配置文件末尾增加tomcat配置
    TOMCAT_HOME=/home/apache-tomcat-7.0.96
    PATH=$PATH:$TOMCAT_HOME/bin
    export TOMCAT_HOME PATH
    
    
    # 刷新配置
    source /etc/profile
    
  7. verification

## 启动tomcat
startup.sh

## 关闭tomcat
shutdown.sh

Guess you like

Origin www.cnblogs.com/zongJianKun/p/11364267.html