1. Download Tomcat
Download the Tomcat's binary version in the address below
http://mirrors.cs.neu.edu/apache/dist/jakarta/tomcat-4/binaries/
Download file
Tomcat-4.1.18.tar.gz
2. Installation
First decompression
Gunzip Tomcat-4.1.18.tar.gz tar -zxvf tomcat-4.1.18.tar
Get all the files of Tomcat. Then copy it to the location you want to install, such as
/opt/tomcat-4.1.18/
Then for your convenience, you can change the directory name Tomcat-4.1.18 to Tomcat.
3. Set
Set the road to add the following two lines of EXPORT JAVA_HOME = / OPT / JDK1.4 Export Tomcat_Home = / OPT / Tomcat here We assume that Java JDK is installed in the /opt/jdk1.4 directory. The default setting for activating rootroot is not activated (DISABLED). In order to activate the root, open the file tomcat / conf / server.xml and then remove the -> "to remove it! And ->. Activate Invoker Servlet Removes
4. Start Tomcat
After installation, restart your computer so that Java_Home and Tomcat_home will take effect. Withdrawal
/ OPT / Tomcat / bin
Next, run the command:
./startup.sh
Under normal circumstances, you can see the following information:
Using catalina_base: / opt / tomcat using catalina_home: / opt / tomcat using catalina_temdir: / opt / tomcat / temp using java_home: /opt/jdk1.4
Then open the page as follows by browser
http: // localhost /
or
http: // localhost: 8080 / (If you don't change Port Number to 80) If you see Tomcat's web page (index.jsp), you have proved that Tomcat is successful and has been started.
To close Tomcat, run the following command in / opt / tomcat / bin
./shutdown.sh
5. Register your own project (Project)
Suppose you have a JSP project, he should be installed in the directory below:
/ OPT / Tomcat / WebApps / MyProject
You must join the line in Tomcat / Conf / Server.xml
The corresponding address in the browser is:
http:// localhost / myproject