November 27, 2007 · Server · Email This Post

Sponsored Link
Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.

Apache Tomcat is developed in an open and participatory environment and released under the Apache Software License. Apache Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. We invite you to participate in this open development project. To learn more about getting involved, click here.

Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.

Download the latest Tomcat to your desktop: http://tomcat.apache.org/, then run

sudo tar zxvf apache-tomcat-6.0.10.tar.gz

sudo cp -R apache-tomcat-6.0.10 /usr/share/tomcat6

Setting JAVA environment

Download the latest J2SE SDK, and run

sudo chmod +x *.bin

sudo sh ./jdk*.bin

Executing the .bin file creates a folder on your desktop named jdk1.6.0_01. Rename that folder to Java6u1. Now move that folder to /usr/lib

sudo mv Java6u1 /usr/lib

sudo update-alternatives --install /usr/bin/java java /usr/lib/Java6u1/bin/java 300

sudo update-alternatives --config java

1 /usr/lib/Java6u1/bin/java
2 /usr/bin/gij-wrapper-4.1
3 /usr/lib/jvm/java-gcj/jre/bin/java

Select 1

Setting the following environment

Edit /etc/environment

gedit /etc/environment, then insert and save two lines

CLASSPATH=.:/usr/lib/Java6u1/bin
JAVA_HOME=/usr/lib/Java6u1

Tomcat needs to set JAVA_HOME or JRE_HOME to execute. Open the follow document and edit the lines

sudo gedit ~/.bashrc

then place the following lines in

export JAVA_HOME=/usr/lib/Java6u1
export PATH=$PATH:$JAVA_HOME/bin

Start and stop tomcat

Now start your tomcat: sudo /usr/share/tomcat6/bin/./startup.sh

Type http://localhost:8080 in your browser. If you see the tomcat welcome page, your tomcat is running smoothly. If you are installing below 5.5 version, please try 8180.

Stopping tomcat: sudo /usr/share/tomcat6/bin/./shutdown.sh

Tomcat administrator setting

Edit this document:

sudo gedit /usr/share/tomcat6/conf/tomcat-users.xml

before </tomcat-users> insert this line

<user username="your username" password="your password" roles="admin,manager"/>

Save and restart your tomcat. You can login to your tomcat admin by using your new set id and password now.

Sponsored Link

Incoming search terms:

Related posts

Leave a Reply