dans tomcat

Install Apache Portable Runtime for Tomcat on RHEL 6.6

Apache Portable Runtime is an interesting HTTP connector : performances, when using SSL are better.

In this article, I’ll explain how to install APR for Tomcat on RHEL 6.6 and how to turn Tomcat to HTTPS.


First, we need to install OpenSSL library and Development Tools as we’ll use configure and make commands.

Install APR

In /tmp folder :

apr will be installed in /usr/local/apr.

Install APR-util

In /tmp folder :

apr-util will be installed In /usr/local/apr/lib.

Install JNI Wrapper

In /tmp folder :

The native libraries were installed in /usr/local/apr.

Go on your tomcat folder and check that :

  • Tomcat include folder has been created
  • Tomcat lib folder contains libtcnative libraries :

Note : Don’t forget to chown file and folder user (and group). Tomcat running & owned by root is BAD, really.

Integrate APR with Tomcat

Edit Tomcat bin/setenv.sh file :

Restart Tomcat, it should work correctly now.

Bonus : Tomcat SSL configuration

Edit Tomcat conf/server.xml file :

Restart Tomcat, it should work correctly again 🙂

Note : If APR is not installed, you should get the following error :


Turning Tomcat to HTTPS using this method is really fast and simple. It avoid using KeyStore and TrustStore sometimes.

This article was largely inspired by this article.

Ecrire un Commentaire