JaiswalTraining

Get the online training



Corejava Servlet Jsp  Php  Hibernate  Ajax Web Service   Ejb2.1 Ejb3.0 Struts Struts2  JPA Spring Ibatis   JSF    JSF2.0  CoreJavaDesignPattern    Jquery  Flex J2EE-Design-Patterns  Jboss7  Maven  Contact Me                                                                                                                                                                        
            IGNOU SMU PTU Project                                           Training                                                                                                                              
              

Contact Us  0091- 9210721663         jaiswaltraining@gmail.com




Corejava
Servlet
Jsp
Php
Hibernate
Ajax
Web Service
Ejb2.1
Ejb3.0
Struts  
Struts2
JPA
Spring
Ibatis
JSF
JSF2.0
CoreJavaDesignPattern
Jquery
Flex
J2EE-Design-Patterns
Jboss7
Maven







Installation
  • Tomcat Installation is easy
  • We will see the tomcat server installation on both window platform and Linux platform.

Installation On window

Tomcat comes in two  version.
  1. one in executable form
  2. one in zip form
    • First type installation.
Executable tomcat Installation
  • Dbl. click on the executable tomcat as shown below in Fig 1.
  • This will start the wizard for the tomcat installation.
  • It also installs the tomcat window service.


                                                    Fig. 1
  • In the coming wizard  click on the next button.


                                                Fig. 2

  • Accept the agreement  as shown below in Fig. 3.
  • Clik On the I Agree button.


                                                     Fig. 3
  • In the Next dialog box select the custom or full installation as shown below in Fig. 3.
  • Or select  the optional components


                                                   Fig. 4

  • Select the destination folder for tomcat installation.
  • By default it is c:\Program Files\Apache Software Foundation\
  • But user can change it as shown below in Fig. 5.
  • Click on the Next Button


                                                      Fig. 5
  • In the configuration dialog box in the Administration Login
    • give the User name
    • give the password
  • Click on Next as shown below in Fig. 6.


                                                   Fig. 6

  • Select the path of the jre as shown below in Fig. 7.
  • Click on the install button.It starts installing.

                                                    Fig. 7
  • It installs the tomcat as shown below in Fig. 8.

                                                      Fig. 8

  • The installation is finished as shown below in Fig. 9.
  • Lets start the tomcat
  • Select Run Apache tomcat and Click on Finish button.



                                                    Fig. 9

  • It is starting the tomcat as shown below in Fig. 10.

                                                      Fig. 10
  • Tomcat startup is tested in the browser.
  • Open the browser and give the url http://localhost:8080
  • It opens the default index.jsp in the browser as shown in Fig. 11



                                                    Fig. 11
  • Tomcat is also installing it as a windown service.
  • Open the tak manager by Rt. Click on the taskbar
  • Select the Processes tab and see the tomcat5w as shown below in Fig. 12.
  • Its running as window service.


                                        Fig. 12
  • Tomcat is installed as a window service.
  • So it can be configured, started and stoped service from the
    system tray tomcat  icon as shown below in Fig. 13.



             Fig. 13.
  • Start the service by right click on the tomcat icon
  • Select start service as shown below in Fig. 14.
  • Similarly it can be stopped and exited


                Fig. 14
  • Monitor tomcat, Configure tomcat and Tomcat manager is also opened by the
    Start-->All Program -->Apache Tomcat6.0--> as shown below in Fig. 15.



                                                        
                                                                                         Fig. 13

Tomcat prsesnt in zip form should be extracted  on C:\
It is now installed.

starting and stopping the tomcat

Then open a command prompt
Here set  the tomcat_home and catalina _home environment variables as follows

C:\>set TOMCAT_HOME=C:\apache-tomcat-6.0.16
C:\>set CATALINA_HOME=C:\apache-tomcat-6.0.16

If java_home is not set then set it here as follows

C:\>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_11

After setting the environment variables start the tpmcat as follows
C:\>\apache-tomcat-6.0.16\bin\startup.bat

It will start up the new comnd prompt showing the tomcat server console

Installation on Linux
On linux it can be installed in two ways
  1. download apache-tomcat-6.0.20.tar.gz and extract
  2. install by the yum commandcompilation of the servlet
first way

                                          Fig.14
  • Extract it by the command tar xvf apache-tomcat-6.0.20.tar.gz or in window by Archive manager.
           $bash] tar xvf apache-tomcat-6.0.20.tar.gz
                   or
           In the Home Folder Right Click and select extract here.
  • It extracts the files in the current directory.
strating and stopping the tomcat

Set  the tomcat_home and catalina _home environment variables as follows

$bash] export  TOMCAT_HOME=/usr/home/jaiswaltraining/apache-tomcat-6.0.16
$bash] export CATALINA_HOME=/usr/home/jaiswaltraining/apache-tomcat-6.0.16

If java_home is not set then set it here as follows

$bash] export  JAVA_HOME=/usr/java/jdk1.6.0_03/

After setting the environment variables start the tomcat as follws

$bash] /usr/home/jaiswaltraining/apache-tomcat-6.0.16/bin/startup.sh

It starts up  tomcat server

second way
Install on the terminal by the yum command as general user

$bash] su -c 'yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps'
Password
It will download and install tomcat 5

$bash] su -c 'yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps'
Password
It will download and install tomcat 6

Start the tomcat by the command

$bash]su -c 'tomcat6 start'
Password

For stopping tomcat give the command

$bash]su -c 'tomcat6 stop'
Password

.