This document uses tomcat-5.5.33 as an example. 1) decompress the package into a folder, depending on the file format. 2) $ vi/etc/profile # open the file in the vi editor for editing (add environment variables) and add the following code at the end of the file: CATALINA_HOME/tools/apache -...
This document uses tomcat-5.5.33 as an example.
1) decompress the package into a folder, depending on the file format.
2) $ vi/etc/profile # open the file in the vi editor and edit it (add environment variables)
Add the following code at the end of the file:
CATALINA_HOME =/tools/apache-tomcat-5.5.33 # (the tomcat version depends on your installation version)
Export CATALINA _ HOME
Save and exit.
3) run the following command on the terminal:
$/Tools/tomcat */bin/startup. sh # enable TOMCAT server
Open the browser and enter http: // localhost: 8080 or http: // 127.0.0.1: 8080. if you see the cute kitten, the installation is successful!
Note: Several problems encountered during installation
Question 1: can't find the file 'setclasspath. SH'
Find the following explanation on the network, that is, you need to set
Then all you need to do is to include the complete paths for the BASEDIR and CATALINA_HOME variables in the files setclasspath. sh and catalina. sh respectively.
This shoshould be done even if CATALINA_HOME has been defined and exported previusly on the command line and/or in/etc/profile as well. moreover, this error message persists even though the file setclasspath. sh is present in Tomcat's bin directory.
$ Echo "BASEDIR =/path/to/tomcat"> setclasspath. sh #/path/to indicates your specific directory $ echo "CATALINA_HOME =/path/to/tomcat"> catalina. sh. However, after setting the preceding settings, run the export command to view the environment variables. it is found that CATALINA_HOME has not changed, therefore, use the following command to modify $ export CATALINA_HOME = "/home/owner/tomcat-5.5.33"
Problem 2: JAVA_HOME or JRE cannot be found. because it is not set, Tomcat cannot find the corresponding environment variable, but the solution to startup is very simple. in the terminal: $ export JAVA_HOME = "/home/owner/tools/jdk1.6.0 _ 26"
This article is from the "Michael_Feng" blog