cbaWorkflow : Setting up Apache Tomcat 9.0.34 on Centos 7


Download apache-tomcat-9.0.34.tar.gz from https://tomcat.apache.org/download-90.cgi

This version is supporting Java 8.

untar the tarbal:

tar xvfz apache-tomcat-9.0.34.tar.gz

change the ownership

chown -R tomcat:users apache-tomcat-9.0.34


su - tomcat

cd /app/apache-tomcat-9.0.34/bin

vi setenv.sh

export CATALINA_HOME=/app/apache-tomcat-9.0.34
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64


cd ../conf

(Replace port 8080 with 1962)

vi server.xml

:1,$s/8080/1962/g

create authorizations for the manager and host-manager applications

vi tomcat_users.xml

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui,admin-gui"/>
</tomcat-users>

allow remote access to manager application:

cd /app/apache-tomcat-9.0.34/webapps/manager/META-INF

vi context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context antiResourceLocking="false" privileged="true" >
</Context>


Start the server:

cd /app/apache-tomcat-9.0.34/bin

./startup.sh

Using CATALINA_BASE: /app/apache-tomcat-9.0.34
Using CATALINA_HOME: /app/apache-tomcat-9.0.34
Using CATALINA_TMPDIR: /app/apache-tomcat-9.0.34/temp
Using JRE_HOME: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64
Using CLASSPATH: /app/apache-tomcat-9.0.34/bin/bootstrap.jar:/app/apache-tomcat-9.0.34/bin/tomcat-juli.jar
Tomcat started.

verify in the browser the initial page is available:

http://r01edge.custom-built-apps.com:1962/

Verify you can connect to manager application from the browser:

http://http://r01edge.custom-built-apps.com:1962/manager

You should see this: