RSS

Install JAVA Tomcat on Linux

24 Nov

Installation of Java

Login to server as root
# cd /opt

Download jdk 6 linux rpm bin package from sun (Java SE Development Kit (JDK))
http://java.sun.com/javase/downloads/index.jsp
http://java.sun.com/javase/downloads/widget/jdk6.jsp

# chmod 777 jdk-6u17-linux-i586-rpm.bin
# ./jdk-6u17-linux-i586-rpm.bin

Follow the onscreen instructions to complete jdk installation…. press space ….. press yes….. and Enter

Now we will find JDK folder at /usr/java/jdk1.6.0_17

Installation TomCat

Download tomcat source files and extract…

# wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
# tar xzf apache-tomcat-6.0.20.tar.gz
# ls

Move tomcat to /usr/java/tomcat/

# mv apache-tomcat-6.0.20 tomcat
# mv tomcat /usr/java/
# cd /usr/java/tomcat/

Set CLASSPATH for JAVA & TOMCAT

# vi /etc/profile    (set class path)

add source PATH to /etc/profile

export JAVA_HOME=/usr/java/jdk1.6.0_17
export CATALINA_HOME=
/usr/java/tomcat
export PATH=$JAVA_HOME/bin:$PATH

# source /etc/profile

Start tomcat server….

# /usr/java/tomcat/bin/startup.sh

Start/Stop Tomcat

# cd /usr/java/tomcat/bin
# ./shutdown.sh
# ./startup.sh

Check tomcat status

# netstat -ntlp|grep 8080

Enjoy new server 🙂

Advertisements
 
3 Comments

Posted by on November 24, 2009 in CentOS, Java, Linux, Tips, Tricks

 

Tags: , , ,

3 responses to “Install JAVA Tomcat on Linux

  1. diätpillen

    November 27, 2009 at 5:01 am

    I first tried to build a webapp, it was very difficult to understand how all these open source technologies connect together. I find these tools to be very powerful and well-written, but daunting to configure them for a useful project.

     
  2. Brahma

    March 19, 2010 at 9:45 am

    HI!U r using not a source of tomcat
    “”Download tomcat source files and extract…

    # wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz“”

    I download src…so it was not work…with core works perfect)

    And by the way … where is JRE_HOME?That will be better )

    export JAVA_HOME=/usr/java/jdk1.6.0_18
    export CATALINA_HOME=/usr/java/tomcat
    export JRE_HOME=$JAVA_HOME/jre
    export PATH=$JAVA_HOME/bin,JRE_HOME/bin:$PATH

    Have a nice day:)

     
  3. Sisay

    July 21, 2010 at 2:43 pm

    Thanks, this is very helpful.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: