Tomcat multi-site configuration + MySQL JDBC + non-root startup

Source: Internet
Author: User
Hardware configuration:
AMD 3200 +
Asus Motherboard
Kst 512 M ddr400 * 2
120g ide
Software Configuration:
Httpd-2.0.52-28.ent.centos4
Php-4.3.9-3.15
Slave --------------------------------------------------------------------------------------------------------------------------------

Tomcat and Apache integration problems please see http://www.centospub.com/bbs/vie... & extra = Page % 3d1

Certificate ------------------------------------------------------------------------------------------------------------------------------------
# Addusr Tomcat
# Chown-r Tomcat: tomcat/usr/local/tomcat
Certificate -----------------------------------------------------------------------------------------------------------------------------------
# Vi/etc/rc. Local
Add at the end:
Su-Tomcat-c '/usr/local/tomcat/bin/startup. Sh'
Certificate ---------------------------------------------------------------------------------------------------------------------------------------
Try reboot. The problem of insecure JSP startup with root is solved.

Su-Tomcat-c '/usr/local/tomcat/bin/shutdown. sh'' command to stop Tomcat
Certificate --------------------------------------------------------------------------------------------------------------------------------------
Tomcat multi-site configuration
Certificate ------------------------------------------------------------------------------------------------------------------------------------
I will not talk about Apache. I will find it myself. The tomcat configuration is as follows:
# Vi/usr/local/tomcat/CONF/server. xml
In the middle of <engine> ---------------------------------------- </engine>, add
<Host name = "your domain name" DEBUG = "0" appbase = "webapps"
Unpackwars = "true" autodeploy = "true"
Xmlvalidation = "false" xmlnamespaceaware = "false">
<Context Path = "" docbase = "your website directory" DEBUG = "0"
Reloadable = "true" crossc/>
<Logger classname = "org. Apache. Catalina. Logger. filelogger"
Directory = "logs" prefix = "localhost_log." suffix = ". txt"
Timestamp = "true"/>
</Host>

Slave --------------------------------------------------------------------------------------------------------------------------------
MySQL JDBC
Download the MySQL JDBC driver and unpack the package
CP mysql-connector-java-3.1.13-bin.jar/usr/local/tomcat/common/lib

Restart tomcat to take effect
The same is true for other drivers. If you are interested, try again.

Http://www.centospub.com/bbs/viewthread.php? Tid = 182 & extra = Page % 3d1 & page = 1

Slave --------------------------------------------------------------------------------------------------------------------------------
Now, I have written down all I learned today. Who can continue? I am free to study jscv to start 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.