Download and unpack mod_jk source package to /root/archive or other location as desired:
wget http://archive.apache.org/dist/jakarta/tomcat-4/source/\
jakarta-tomcat-connectors-4.1.27-src.tar.gz
tar -xvzf jakarta-tomcat-connectors-4.1.27-src.tar.gz
cd jakarta-tomcat-connectors-4.1.27-src/jk/native2
Prepare the configure script:
chmod 755 buildconf.sh
./buildconf.sh
Run the configure script:
./configure –with-apxs2=/usr/sbin/apxs \
–with-java-home=/usr/java/j2sdk1.4.2/
make
libtool –finish /usr/lib/httpd/modules
Copy the new modules to the apache modules directory:
cp ../build/jk2/apache2/*.so /etc/httpd/modules/