How to update Tomcat on linux

My current Tomcat launch is as follows

Tomcat Version : Apache Tomcat/5.5.36 Servlet Specification Version : 2.4 JSP version : 2.0 

I need to change it to

 Tomcat Version : Apache Tomcat/8.0.14 Servlet Specification Version : 3.1 JSP version : 2.3 

I downloaded Tomcat version 8 and I have the following: how can I start Tomcat 8 and make it the default server?

 root@server [/opt]# ls ./ cpanel/ pcre/ ../ curlssl/ php_with_imap_client/ apache-tomcat-8.0.18/ jdk1.7.0_75/ suphp/ apache-tomcat-8.0.18.tar.gz jdk-7u75-linux-x64.tar.gz xml2/ 

I tried the following command but it failed.

 root@server [/opt/apache-tomcat-8.0.18/bin]# ./startup.sh Cannot find apache-tomcat-8.0.18/bin/setclasspath.sh This file is needed to run this program 

~ / .bashrc

 # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi JAVA_HOME="/usr/lib/jvm/jre-1.7.0-openjdk.x86_64" export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH export CATALINA_HOME="apache-tomcat-8.0.18" 

Java version

 java -version java version "1.7.0_75" OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode) root@server [/opt/apache-tomcat-8.0.18/bin]# 

O / s

 Linux server.myproject.com 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr 17 23:56:34 BST 2012 x86_64 x86_64 x86_64 GNU/Linux 
+6
source share
1 answer

Tomcat startup.sh script uses $ CATALINA_HOME to search for setclasspath.sh, which causes a failed launch. Therefore, $ CATALINA_HOME should be the absolute path to your tomcat installation directory, for example.

export CATALINA_HOME="/opt/apache-tomcat-8.0.18"

If you plan to upgrade again, you might consider installing $ CATALINA_HOME in / opt / tomcat, then you will create a symlink from / opt / tomcat in / opt / apache-tomcat-8.0.18 or any other future version that you will end up with the result of the installation. Since you are likely to have several environment variables pointing to your tomcat directory, this gives you one change point when updating links.

ln -nsf /opt/apache-tomcat-8.0.18 /opt/tomcat

+1
source

Source: https://habr.com/ru/post/982125/


All Articles