# wget http://apache.mirror.cdnetworks.com//tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz
# tar xvfz tomcat-connectors-1.2.37-src.tar.gz
# cd tomcat-connectors-1.2.37-src/native/
# ./buildconf.sh
# ./configure --with-apxs=/usr/local/apache/bin/apxs
# make; make install
# ls -l /usr/local/apache/modules/mod_jk.so
-rwxr-xr-x 1 root root 1113496 2013-08-16 15:08 /usr/local/apache/modules/mod_jk.so
mod_jk.so 파일이 없다면 아래 경로에서 확인하고 복사
#cd /usr/local/src/tomcat-connectors-1.2.37-src/native/apache-2.0/
# cp /usr/local/src/temp/tomcat-connectors-1.2.37-src/native/apache-2.0/mod_jk.so
/usr/local/apache/modules/mod_jk.so
# vi /usr/local/apache/conf/workers.properties
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/java/jdk
ps=/
worker.list=kickingplay
worker.kickingplay.type=ajp13
worker.kickingplay.host=localhost
worker.kickingplay.port=8009
worker.kickingplay.lbfactor=1
worker.kickingplay.connection_pool_timeout=600
worker.kickingplay.socket_keepalive=1
# vi /usr/local/apache/conf/httpd.conf
#### Tomcat-Connector setting by kickingPlay ####
Include conf/mod_jk.conf
# vi /usr/local/apache/conf/mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
Options FollowSymLinks
#AllowOverride All
# vi /usr/local/apache/conf/extra/httpd-vhosts.conf
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/kickingplay"
JkMount /* kickingplay
ServerName localhost ( IP address or Domain address)
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
# vi /usr/local/tomcat/conf/server.xml
# vi /usr/local/apache/conf/extra/httpd-vhosts.conf
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/kickingplay"
JkMount /* kickingplay
ServerName localhost ( IP address or Domain address)
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
# vi /usr/local/tomcat/conf/server.xml
# /usr/local/apache/bin/apachectl stop
# /usr/local/apache/bin/apachectl start
# /usr/local/tomcat/bin/shutdown.sh
# /usr/local/tomcat/bin/startup.sh
Document root에 index.html, index.jsp넣어 확인
- localhost://index.html
- localhost://index.jsp 확인
- index.jsp는 다음과 같이 간단한 jsp코드를 넣어 서블릿 실행되는 지 확인