Install JAVA Tomcat on Linux

On November 24, 2009, in CentOS, Java, Linux, Tips, Tricks, by phpsolutions

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 🙂

4 Responses to Install JAVA Tomcat on Linux

  1. Anonymous says:

    I’ve recently started a blog, the data you provide here has reduced the problem tremendously. I appreciate you for all of your current time & work…

  2. Anonymous says:

    To be sure completely with your conclusions and believe that you’ve made some excellent points. Also, I prefer customized for specific cultures of one’s site along with the easy navigation. I’ve bookmarked your website and will return often!

  3. Anonymous says:

    I’m really thankful on the author of this post in making this lovely and informative article live for us. We actually appreciate ur effort. Continue the favorable work. . . .

  4. Anonymous says:

    I was boastful to uncover this site.I desired to we appreciate you an excellent read!! I definitely enjoying every part of it and i also maybe you’ve bookmarked to look at new items you post.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.