Ubuntu10.04 Tomcat configuration

Source: Internet
Author: User

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
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.