I used this site for directions: http://www.openlogic.com/wazi/bid/277036/Three-ways-to-integrate-Tomcat-and-Apache-for-best-performance-and-features
Apache と Tomcat の連携に関してです。modjk 使うパターンと modproxyajp を使うパターンのそれぞれで。「さっと環境欲しい時にさっと取り出せる情報あればいいかなぁ」ぐらいの軽い感じの内容です。環境は Apache 2.2.15 ( CentOS 6.2 の同梱版 ) / Tomcat. Technical blog about Linux, Security, Networking and IT. Study guides for RHCE, LPIC and more.
We have to compile and install the mod_jk from the source code as no binaries exist for CentOS 6.5.
Prerequisites:
Install the GNU compiler collection with C++ support (gcc, gcc-c++) and Apache's development tools, including the required apxs tool.
#yum install gcc gcc-c++ httpd-devel
Downloaded JK 1.2.39 source code from here: http://tomcat.apache.org/download-connectors.cgi
tomcat-connectors-1.2.39-src.tar.gz
Installation:
Unzip file
cd /opt
# tar -xzf tomcat-connectors-1.2.39-src.tar.gz
Command above created the directory
/opt/tomcat-connectors-1.2.39-src/
Configure and install
cd/opt/tomcat-connectors-1.2.39-src/native
./configure --with-apxs=/usr/sbin/apxs
make
make install
The module will be installed in
/usr/lib64/httpd/modules/mod_jk.so
Configure mod_jk
********************This configuration was changed************************
Configure module via two files: /etc/httpd/conf.d/tomcat.conf and workers.properties
tomcat.conf