(3) tar xvzf jakarta-tomcat-connectors-1.2.15-src.tar.gz
(4) cd jakarta-tomcat-connectors-1.2.15-src/jk/native
(5) Now you are ready to create the custom configure file for your system. Execute the following:
./buildconf.sh
如果提示失败,最好下载
autoconf,automake,libtool
This will create a configure file in the
/usr/src/jakarta-tomcat-connectors-1.2.15-src/jk/native directory.
(6) Execute the following command in order to configure mod_jk for your system.
Important note: You will need to have apxs2 (APache eXtension tool) installed and configured with Apache.
If you do not have it, as was my case, you can download and install the apache2-threaded-dev package
(which replaced the former apache-dev package) from www.debian.org.
At the time of this writing, the Debian package archive at www.debian.org was down and
they referred me to their temporary site until they resolved their issues pdo.debian.net.
I found the apache2-threaded-dev package and was able to install it successfully.
Be sure to include the correct location apxs2 on your system in the path of the command.
LIBTOOL = /usr/share/apr-1.0/build/libtool --silent --tag CC
(8) make install 执行后应该在/usr/local/apache2/modules/可以看到mod_jk.so
5 Configuring Tomcat and Apache
Create the workers.properties file
Important note: Be sure to make a backup copy of your config files before modifying.
The workers.properties file contains the details about how each process is linked to Tomcat by defining workers that communicate through the ajpv13 protocol. Refer to the Workers HowTo for more detail.
1.First create the workers.properties file in your Apache2 root directory.
touch /usr/local/apache2/conf/workers.properties
2.Next, open the workers.properties file and add the following.
You can find many other examples of the workers.properties file on the internet,
but this is the one that I created and it seems to work fine with the other portions
that have already been configured in this tutorial.
4. Now we need to open the /usr/local/apache2/conf/httpd.conf file and add the following lines at the bottom.
(httpd.conf is just for backward compatibility)