Tomcat Quick Reference
From 5dollarwhitebox.org Media Wiki
[edit]
Installation and Configuration
Please reference the Howto here: Apache Tomcat with Mod_JK (May 23, 2006)
[edit]
Configure JDBC MySQL Driver
Download The JDBC MySQL Driver
MySQL JDBC Connector: http://mysql.com/downloads/connector/j/5.0.html
linuxbox /tmp]# wget http://www.stathy.com/mysql/Downloads/Connector-J/mysql-connector-java-5.0.3.tar.gz linuxbox /tmp]# tar -zxvf mysql-connector-java-5.0.3.tar.gz linuxbox /tmp]# cd mysql-connector-java-5.0.3 linuxbox /tmp]# cp mysql-connector-java-5.0.3-bin.jar /opt/jakarta-tomcat-5.5.17/common/lib/
Replace '/opt/jakarta-tomcat-5.5.17' with the location of your Tomcat Home Directory. Also replace the 'wget' line with the actual URL to the MOST RECENT version of the connector.
Um... that installs the driver... now, what to do with it..... ::shrugs:: I need to RTFM and will update this then.
[edit]
Configuring SSL
SSL With an Existing Certificate / Key Pair
Upload the Certificate Files You first need to upload the following to the server:
- Certificate File
- Key File to the server
- CA Certificate File
Convert to PKCS12 format
[root@www conf]# openssl pkcs12 -export \ -in certs/www.domain.com.crt \ -inkey certs/www.domain.com.key \ -out www.domain.com.pkcs12 \ -name www.domain.com \ -CAfile certs/ThawteServerCA.cer \ -caname root -chain
Note: This is all one command delimited by the '\'.
Add the connector to %JAVA_HOME%/conf/server.xml
<Connector address="10.1.1.15" port="443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/usr/local/tomcat/conf/certs/www.domain.com.pkcs12" keystoreType="PKCS12" keystorePass="password"/>
