Start your free, no-risk, 4 week trial!

Setting up tomcat 6 with APR and ssl

Last week i had to configure a new tomcat server to work with ssl and the apr libary, i’m going to put my notes here cause it took me some time to figure it all out, and maybe it will help some other people too

Step 1. update your server to ahve all the nessacary stuff
We need OpenSSL including the devel-libs and ofcourse the APR libs

yum install openssl openssl-devel apr apr-devel

Step 2. Building the tomcat-native-apr libs
I assume you have a working tomcat allready installed, mine is in /home/tomcat change it to your tomcat home dir
you need to unpack the  sourcefiles located in your tomcathome/bin directory

cd /home/tomcat/bin/
tar xvfz tomcat-native.tar.gz

go to  the building directory

cd tomcat-native-*/jni/native/

configure and make the lib files with the path to your apr-config and the openssl libs

./configure –with-apr=/usr/bin/apr-1-config –with-ssl=/usr/lib/openssl
make
make install

Step 3. Having tomcat find your APR libs
Tomcat needs to know the location of the APR libaries, so you need to add the following line to your startscript or

-Djava.library.path=/usr/local/apr/lib

restart tomcat and you should be done!

Start your free, no-risk, 4 week trial!
Copyright © 2024 Opentracker. All rights reserved.