Tomcat Installation

From Glitchdata
Jump to navigation Jump to search

This is about Tomcat installation on a RHEL, apache environment. These are fairly generic instructions suitable for both Tomcat 6/7.

Tomcat6 Installation on RHEL

  • yum install tomcat will give you Tomcat6
  • Tomcat7 is currently not available via yum
yum install tomcat

Tomcat7 Installation on RHEL

[root@server java]# JAVA_HOME=/usr/java/jdk1.7.0_45
[root@server java]# export JAVA_HOME  
[root@server java]# PATH=$JAVA_HOME/bin:$PATH  
[root@server java]# export PATH  
  • If you are running java from commandline, you will need to add this to your ~/.bash_profile
  • Unzip Tomcat
tar -zxvf apache-tomcat-7.0.50.tar.gz
  • This unzip into a self-contained tomcat environment /apache-tomcat-7.0.50
  • Tomcat6 which is installed by yum is located at /usr/share/tomcat6
  • Copy apache-tomcat-7.0.50 to /usr/share/apache-tomcat-7.0.50/

Setting up Tomcat Service

Autoboot on Startup

Start Tomcat via Service

  • Start Tomcat
[root@server ~]# service tomcat start  
    Using CATALINA_BASE:   /usr/share/apache-tomcat-7.0.50  
    Using CATALINA_HOME:   /usr/share/apache-tomcat-7.0.50  
    Using CATALINA_TMPDIR: /usr/share/apache-tomcat-7.0.50/temp  
    Using JRE_HOME:        /usr/java/jdk1.7.0_45  
    Using CLASSPATH:       /usr/share/apache-tomcat-7.0.50/bin/bootstrap.jar:/usr/share/apache-tomcat-7.0.50/bin/tomcat-juli.jar 


Tomcat 7 requires Java SE6 Tomcat 6 requires Java SE5