Welcome
to my homepage
   
 ITALY: WORLD CHAMPIONS, FIFA WORLD CUP 2006 GERMANY.
Search on WEB BETA
       
 
 
  :: Supported By ::
 
 
 
    Instalation Guides
 
Installing Apache Tomcat and J2EE SDK in Linux.
PRE-INSTALLATION
Download jakarta-tomcat-4.1.31.tar.gz and j2eesdk-1_4_2005Q1-linux.bin from here or visit their respective homepages www.apache.org and www.java.sun.com for latest packages.
Save the source into your home directory say: /home/akash/software.
INSTALLATION
Installing J2EE SDK
Be in the location of the Source directory: /home/akash/software
# cd /home/akash/software
Verify the size of the file that you downloaded, with that of the size metioned in the page you downloaded the source, if they are equal then your source has been downloaded correctly. Make sure the execute permissions for the file is set correct.
Run this command
# chmod +x j2eesdk-1_4_2005Q1-linux.bin
Extract the source
# ./j2eesdk-1_4_2005Q1-linux.bin
This will extract the source using GUI mode.
OR
# ./j2eesdk-1_4_2005Q1-linux.bin -console
This will extract the source using Console mode.
If you are using GUI terminal then during the extraction process you will see some dailog boxes for SETUP purpose.
Do the followings.
Welcome Screen appears
Click on Next.
Software Licence Agreement
Click on Yes => Click on Next.
Select Installation Directory
Change the Directory to: /usr/local/src/
The package will be extracted to /usr/local/src inside jdk folder.
Click on Next
Create New Directory?
Click on Create Directory
Admin Configuration
Supply Passsword
Click on Prompt for Admin User Name
Admin Port: 4848
HTTP: 8080
HTTPS: 8181
Installation Option
Click on Create Sample Server
Ready to Install
Click on Install Now.
Now you will see J2EESDK Installation Wizard
It may take pretty long time, during installation. So be patient.
Now you have installed JDK into your system so now we require to set PATH and CLASSPATH.
Open file /etc/profile with your favourite editor and add following lines at the end.
PATH=$PATH:/usr/local/src/jdk/bin
export PATH
CLASSPATH=$CLASSPATH:/usr/local/src/jdk/lib
export CLASSPATH
Save the file and logout the session, to make the changes.
 
Installing Apache Tomcat.
I usually extract the source files in the location: /usr/local/src, so be there.
# cd /usr/local/src
Now we unpack the Apache Tomcat binary.
# tar zxvf /home/akash/softwares/jakarta-tomcat-4.1.31.tar.gz
Directory called jakarta-tomcat will be created as: /usr/local/src/jakarta-tomcat-4.1.31
# cd jakarta-tomcat-4.1.31
Again we need to set paths for JAVA_HOME and CATALINA_HOME
Open file /etc/profile with your favourite editor and add following lines at the end.
JAVA_HOME=/usr/local/src/jdk
export JAVA_HOME
CATALINA_HOME=/usr/local/src/jakarta-tomcat-4.1.31
export CATALINA_HOME
Save the file and logout the session, to make the changes.
We have finished all the installation steps for JDK and Tomcat, we test for the installed packages.
 
STARTING Tomcat Server.

Startup script for Tomcat is placed at: /usr/local/src/jakarta-tomcat-4.1.31/bin
We start the server manually from the command line or can create own script to make them start at every STARTUP.
# /usr/local/src/jakarta-tomcat-4.1.31/bin/startup.sh
# /usr/local/src/jakarta-tomcat-4.1.31/bin/catalina.sh start
STOPING Tomcat Server
# /usr/local/src/jakarta-tomcat-4.1.31/bin/shutdown.sh
# /usr/local/src/jakarta-tomcat-4.1.31/bin/catalina.sh stop <.br>
TESTING
After Starting the TOMCAT Server, we test for it, in the address bar of your favourite browser just type:

http://localhost:8080/

Then you should see the Tomcat's Page displayed. If so then your installation is correct and that the server has been started. otherwise remove the Tomcat and reinstall it as mentioned as above.
Now we try to run browse a JSP Page.
Here is the simple JSP code to print Hello World, hello.jsp
<%
out.println("HELLO WORLD");
%>
Save it, and place it into /usr/local/src/jakarta-tomcat-4.1.31/webapps/examples/
Now browse it, using following address.

http://localhost:8080/examples/hello.jsp

You should see JSP page displayed with the content 'HELLO WORLD'.
If you see this then we assume that your JDK as well as TOMCAT installation is successful.
This is the END of the Manual.
Last Updated on: 22nd Sept 2005
The Author can be contacted at: akashrestha@hotmail.com
 
Back to Top