Setting Up OpenSSL on Linux (Debian & Red Hat)

    Procedure
  1. Install Apache Portable Runtime (APR) and OpenSSL. OpenSSL is already available in most linux setups.

    For Debian based Linux use the following command:

    apt-get install build-essential libapr1-dev libssl-dev

    For Red Hat, download source (the .tar.gz file) for APR1 from http://apr.apache.org/download.cgi Now run the following commands:

    tar xvzf apr-1.5.1.tar.gz
    cd apr-1.5.1
    ./configure
    make
    make install
  2. Note down the path shown at the end of the command make install. This directory contains the apr-1-CONFIG file, which is used for building the Tomcat native library.
  3. To build Tomcat native library, extract tomcat-native.tar.gz, which is located under TOMCAT_HOME/bin/tomcat-native.tar.gz, to a local directory (for example, home/user/tomnative). You can download Tomcat from the following URL:
  4. Browse to the native library in the extracted directory (for example, home/user/tomnative/tomcat-native-1.1.32-src/jni/native) and run the following commands:
    /configure -with-apr=1-CONFIG> -with-java-home= -with-ssl=yes -prefix=destinationDirectoryForLibrariesInstallation
    make
    make install

    To verify if the installation is successful, browse to the destination directory provided for libraries installation and check if it contains five new files (with .so, .la and .a extensions).

  5. Provide the path of the destination directory provided for libraries installation in the TRA file.

    LD_LIBRARY_PATH=destinationDirectoryForLibrariesInstallation

    export LD_LIBRARY_PATH