Search the web
Sign In
New User? Sign Up
lucknow-lug · Uttar Pradesh Linux Users Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Installation of java and Apache-tomcat on Linux   Message List  
Reply | Forward Message #190 of 247 |
Installation of java and Apache-tomcat on Linux


1.Introduction
2.Installation of java
3.Installation of apache tomcat
4.References


1.Introduction:
This document is meant for the installation of java and apache-tomcat
over a linux machine.

2.Installation of java
Download the JDK from Sun, to start go here:
http://java.sun.com/javase/downloads/index.jsp
Click on the "Download" link in the JDK section.
Accept the license and continue.

Under the "Linux Platform", select "rpm self-extracting file".
Download this .bin file and save it to your Linux machine.

become root, and give command chmod 755 downloaded_bin_file for
instance "chmod 755 jdk-6u2-linux-i586.bin"

now execute file with command ./downloaded_bin_file

Accept the license after scrolling down on the terminal. This will
give a .rpm file in the same directory.

install the extracted .rpm file with rpm -ivh extracted_file.rpm

Set the path of java
To set the path of java edit /etc/profile file and add the following lines
JAVA_HOME=/usr/java/jdk1.5.0_09
export PATH=$PATH:$JAVA_HOME/bin
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME
Note: Here rpm file installed java in /usr/java/jdk1.5.0_09 choose the
path name as per your installation version.

Now give command "source /etc/profile"
check the path by giving command

[root@anuj2 ~]# echo $JAVA_HOME
/usr/java/jdk1.5.0_09



3.Installation of apache-tomcat
Download apache-tomcat from
http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/
tar zxvf apache-tomcat-5.5.25.tar.gz
cd apache-tomcat-5.5.25/bin
[root@anuj2 bin]# sh startup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25
Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp
Using JRE_HOME: /usr/java/jdk1.5.0_09

Automatic startup of apache-tomcat at boot time(Redhat Linux):
Save following script in /etc/init.d/ directory with tomcat name
Note: Use correct path of catalina.sh in PROGRAM

#!/bin/sh
# chkconfig: - 85 15
# description: Tomcat is a servlet container
#PROGRAM=$CATALINA_HOME/bin/catalina.sh
PROGRAM=/usr/local/apache-tomcat-5.5.25/bin/catalina.sh
if [ -f $PROGRAM ]; then
echo "$1ing" `basename $0`
su - root -c "$PROGRAM $1"
fi

Now use following commands
"chmod 755 /etc/init.d/tomcat"
"chkconfig --add tomcat "
"chkconfig --level 345 tomcat on"
"service tomcat start"

4.References:
http://apache.org/
http://tech.groups.yahoo.com/group/lucknow-lug/

Anuj Singh








Tue Jun 24, 2008 7:01 am

anujsingh_1
Offline Offline

Forward
Message #190 of 247 |
Expand Messages Author Sort by Date

Installation of java and Apache-tomcat on Linux 1.Introduction 2.Installation of java 3.Installation of apache tomcat 4.References 1.Introduction: This...
anujsingh_1
Offline
Jun 24, 2008
7:02 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help