Tomcat is a container used to parse JAVA Servlet and JSP. It is often used for small and medium-sized JAVA Web application servers. It is open source code and is free for public use.
Tomcat official homepage www.apache.org/, Here download is apache-tomcat-6.0.26.tar.gz
You must first install JDK to your Ubuntu10.04 to ensure that the JAVA environment variable has been configured.
1. Go to the Tomcat/bin directory, open the catalina. sh file for editing, press Enter next to the 81 lines of the file (after the comment), and add the JAVA_HOEM and JAVA_OPTS lines of code, as shown below:
JAVA_HOME =/home/Program/jdk1.6.0 _ 17
JAVA_OPTS = "-server-Xms512m-Xmx1024m-XX: PermSize = 600 M-XX: MaxPermSize = 600 m-Dcom. sun. management. jmxremote"
2. After adding the above two lines of code, save and close the code. Exit the bin directory and go to the conf directory.
Open the tomcat-users.xml file and modify it as follows:
<Tomcat-users>
<Role rolename = "manager"/>
<Role rolename = "admin"/>
<User username = "Ja8Enq3Px" password = "92 UbqZrTU" roles = "admin, manager"/>
</Tomcat-users>
Save and close the changes.
3. You can open the server. xml file to modify the port. The default value is 8080.
4.1, type the command [startup. sh Directory]/startup. sh, and you will see
Using CATALINA_BASE:/home/[logon username]/MyTool/apache-tomcat-6.0.26
Using CATALINA_HOME:/home/[logon username]/MyTool/apache-tomcat-6.0.26
Using CATALINA_TMPDIR:/home/[logon username]/MyTool/apache-tomcat-6.0.26/temp
Using JRE_HOME:/home/[logon username]/jdk1.6.0 _ 20
Using CLASSPATH:/home/[logon username]/MyTool/apache-tomcat-6.0.26/bin/bootstrap. jar
Tomcat started successfully. You can access http: // localhost: 8080 to check Tomcat.
4.2 double-click Tomcat's startup. sh and access http: // localhost: 8080 to detect Tomcat