Created
August 16, 2015 15:35
-
-
Save patmandenver/43f2f8690302bf85fc34 to your computer and use it in GitHub Desktop.
Tomcat 8 APR fix for Ubuntu 14.40 and Oracle Java 7 installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Simple script to install Oracle Java 7 with auto accepting the license | |
# No need to interact with it | |
# | |
###################################### | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run with admin privileges 'sudo'" | |
echo "exiting...." | |
exit 1 | |
fi | |
echo "" | |
echo "Installing APR Tomcat tool" | |
apt-get install libapr1 libaprutil1 libapr1-dev libssl-dev make | |
wget http://apache.mirrors.tds.net/tomcat/tomcat-connectors/native/1.1.33/source/tomcat-native-1.1.33-src.tar.gz | |
tar -xvzf tomcat-native-1.1.33-src.tar.gz | |
cd tomcat-native*/jni/native | |
ln -s /usr/lib/jvm/java-7-oracle/include/linux /usr/lib/jvm/java-7-oracle/jre/linux | |
ln -s /usr/lib/jvm/java-7-oracle/include/linux/jni_md.h /usr/lib/jvm/java-7-oracle/include/jni_md.h | |
ln -s /usr/lib/jvm/java-7-oracle/include/linux/jawt_md.h /usr/lib/jvm/java-7-oracle/include/jawt_md.h | |
./configure --with-java-home=/usr/lib/jvm/java-7-oracle/ --with-apr=/usr/bin/apr-1-config --with-os-type=include/linux | |
make | |
make install | |
ln -s /usr/local/apr/lib/libtcnative-1.so /usr/lib/libtcnative-1.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, I followed this script and executed manually, and it permitted me to compile apache native library in my tomcat 8 :)