Friday 20 December 2013

Find to install Tomcat6 on Ubuntu 12.04

STEP 1: INSTALL THE ORACLE JDK, IF YOU HAVE NOT DONE SO ALREADY
Follow the installation instructions in How to Install Oracle Java 6 update 37 on Ubuntu 12.04 Linux.

STEP 2: INSTALL THE TOMCAT6 PACKAGE
During this step, Tomcat and OpenJDK will be installed. We will configure Tomcat in a later step to use the Oracle JDK instead.
Run the following commands in your console:
1 sudo apt-get update
2 sudo apt-get install tomcat6

STEP 3: STOP THE TOMCAT6 SERVICE
Run the following command in your console to stop the tomcat6 service:
1 sudo service tomcat6 stop
Response:
1 Stopping Tomcat servlet engine tomcat6 [ OK ]

STEP 4: EDIT THE TOMCAT6 DEFAULT START-UP CONFIGURATION FILE
Run the following command in your console to edit the default tomcat6 start-up configuration file:
1 sudo nano /etc/default/tomcat6

Change the JAVA_HOME option to the following and remove the starting #:
1 JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
Save the file and you are done. Tomcat will now start using the Oracle JDK instead of the OpenJDK.

STEP 5: START THE TOMCAT6 SERVICE
Run the following command in your console to start the tomcat6 service:
1 sudo service tomcat6 start

STEP 6: OPEN THE DEFAULT TOMCAT PORT IN YOUR FIREWALL
You only need to run this command if you have a firewall enabled:
1 sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

STEP 7: DOWNLOAD THE FILES AND COPY THE FILES

Tomcat 6 Downloads link
http://tomcat.apache.org/download-60.cgi

extract that tar file copy all files into /var/lib/tomcat6/webapps
1.examples
2.host-manager
3.manager
4.ROOT

STEP:8 ADD the Fallowing Lines in tomcat-users.xml

<tomcat-users>


<role rolename="manager"/>

<user username="Admin" password="tomcat" roles="manager"/>

</tomcat-users>

STEP 8: TEST YOUR INSTALLATION
Navigate your browser to http://localhost:8080. If you see “It works!”, the installation was successful.



STEP 9: REBOOT YOUR SYSTEM
This step is necessary to test whether your tomcat6 server automatically starts when Ubuntu starts:
1 sudo reboot

STEP 10: TEST YOUR INSTALLATION

Navigate your browser to http://localhost:8080. If you see “It works!”, you have confirmed that the installation was successful.

No comments:

Post a Comment