ARTICLE AD BOX
Ref doc:
https://tomcat.apache.org/native-1.3-doc/index.html
install dev tools
sudo apt install build-essential libapr1-dev libssl-dev -yPrepare work dir under your Downloads directory
mkdir -p ~/Downloads/wk-000Download Tomcat 9
cd ~/Downloads/wk-000 wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.113/bin/apache-tomcat-9.0.113.tar.gzUnzip Tomcat 9
tar -zxvf apache-tomcat-9.0.113.tar.gzUnzip Tomcat Native Source
You don't need to download the Tomcat native source code separately; it's already included in the Tomcat bin directory.
cd ~/Downloads/wk-000/apache-tomcat-9.0.113/bin tar -zxvf tomcat-native.tar.gzRun Command configure
note: change /home/demo to your user directory path.
cd ~/Downloads/wk-000/apache-tomcat-9.0.113/bin/tomcat-native-1.3.1-src/native ./configure --with-apr=/usr/bin/apr-1-config \ --with-java-home=$JAVA_HOME \ --with-ssl=/usr \ --prefix=/home/demo/Downloads/wk-000/apache-tomcat-9.0.113Run Command make and install
make make installIf everything ok , you will see the message:
Libraries have been installed in: /home/demo/Downloads/wk-000/apache-tomcat-9.0.113/libAdd setenv.sh
nano ~/Downloads/wk-000/apache-tomcat-9.0.113/bin/setenv.shAdd two lines
CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=$CATALINA_HOME/lib" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/libmake setenv.sh as executeable
chmod +x ~/Downloads/wk-000/apache-tomcat-9.0.113/bin/setenv.shStart tomcat
cd ~/Downloads/wk-000/apache-tomcat-9.0.113/bin ./startup.shVerify
Run Command 1: (under ~/Downloads/wk-000/apache-tomcat-9.0.113/bin )
grep -E "Native|APR" ../logs/catalina.outIf suceess, you will see:
20-Jan-2026 14:10:02.625 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.3.1] using APR version [1.7.2].Run Command 2: (under ~/Downloads/wk-000/apache-tomcat-9.0.113/bin )
grep "OpenSSL" ../logs/catalina.outIf suceess, you will see:
20-Jan-2026 14:10:02.626 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 20-Jan-2026 14:10:02.629 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.13 30 Jan 2024]Clean tomcat-native directory
rm -rf ~/Downloads/wk-000/apache-tomcat-9.0.113/bin/tomcat-native-1.3.1-srcThe test and verification have now been successful. You can move the apache-tomcat-9.0.113 directory to another directory.
