Install Tomcat 7 on centos 6.3

Source: Internet
Author: User

(1)download apache-tomcat-7.0.30.tar.gz

(2) unzip: tar-zxvf apache-tomcat-7.0.30.tar.gz

(3) copy to/usr/local and rename it as tomcat7: sudo CP-r APACHE-Tomcat-7.0.30/usr/local/tomcat

(4) Go to the bin directory under tomcat7: CD/usr/local/tomcat7/bin

(5) start Tomcat 7: sudo./startup. Sh

Display: Using catalina_base:/usr/local/tomcat7
Using catalina_home:/usr/local/tomcat7
Using catalina_tmpdir:/usr/local/tomcat7/temp
Using jre_home:/usr/Java/jdk1.7.0 _ 07
Using classpath:/usr/local/tomcat7/bin/Bootstrap. jar:/usr/local/tomcat7/bin/tomcat-juli.jar

(6) Disable Tomcat 7: sudo./shutdown. Sh

Display: Using catalina_base:/usr/local/tomcat7
Using catalina_home:/usr/local/tomcat7
Using catalina_tmpdir:/usr/local/tomcat7/temp
Using jre_home:/usr/Java/jdk1.7.0 _ 07
Using classpath:/usr/local/tomcat7/bin/Bootstrap. jar:/usr/local/tomcat7/bin/tomcat-juli.jar

(7) Add the Tomcat environment variable sudo VI/etc/profile, in red

# Set environment variable
Export java_home =/usr/Java/jdk1.7.0 _ 07
Export classpath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export tomcat_home =/usr/local/tomcat7
Export catalina_home =/usr/local/tomcat7
Export Path = $ path: $ java_home/bin

(8) Make the configuration take effect: sudo source/etc/profile.

(9) by default, Tomcat does not provide an account with administrative permissions, so you need to add an account with such permissions. Role Manager-Gui has this permission, but the two roles and their corresponding users are not set in the System user control file tomcat-users.xml, so you need to add such roles and users, to open the tomcat-users.xml file, add the following:

<Role rolename = "Manager-Gui"/>

<User Username = "manager" Password = "manager" roles = "Manager-Gui"/>

Restart the Tomcat server, and the file modification takes effect.

Related Article

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.