Thursday, December 12, 2019

Install Apache Tomcat on Linux

Install Tomcat on Linux :

1) Downloaded apache-tomcat-9.0.8.tar.gz for Linux server

2) Untar it on some location

[root@stand soft]# tar -xvf apache-tomcat-9.0.8.tar.gz -C /u02/apache/
apache-tomcat-9.0.8/conf/
apache-tomcat-9.0.8/conf/catalina.policy


3) Used tomcat user for this so change the ownership of the directory

chown tomcat:tomcat /u02/apache/apache-tomcat-9.0.8

Also edit bash_profile as

PATH=$PATH:$HOME/bin:$CATALINA_HOME/bin
CATALINA_HOME=/u02/apache/pache-tomcat-9.0.8
export CATALINA_HOME
export PATH

Source the environment variable :

. ./bash_profile

4) We want to start it on port 8006

so modified the value as below:

-bash-4.1$ pwd
/u02/apache/apache-tomcat-9.0.8/conf

-bash-4.1$ grep -i 8006 server.xml
    <Connector port="8006" protocol="HTTP/1.1"

5) Start tomcat

-bash-4.1$ sh $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE:   /u02/apache/apache-tomcat-9.0.8
Using CATALINA_HOME:   /u02/apache/apache-tomcat-9.0.8
Using CATALINA_TMPDIR: /u02/apache/apache-tomcat-9.0.8/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /u02/apache/apache-tomcat-9.0.8/bin/bootstrap.jar:/u02/apache/apache-tomcat-9.0.8/bin/tomcat-juli.jar
Tomcat started.

6) Launch the url http://stand.som.com:8006


Thanks,


No comments:

Post a Comment