john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Tomcat7 install ssl static content ROOT libtcnative source

sudo apt-get install openjdk-7-jdk java -version export JAVA_HOME "/usr/lib/jvm/java-7-openjdk-amd64"

apt-get install tomcat7 apt-get install libtcnative-1 (otherwise "The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found...")

"SEVERE: An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24" sudo apt-get install make gcc openssl libssl-dev

download latest APR version, e.g. apr-1.5.0.tar.gz FROM: http://apr.apache.org/download.cgi

tar -xf apr.1.5.0.tar.gz cd apr-1.5.0 sudo ./configure ; sudo make ; sudo make install ls -ahl /usr/local/apr/lib

download the latest tomcat native connector source, e.g. tomcat-native-1.1.29.src.tar.gz: http://tomcat.apache.org/download-native.cgi

tar -xzf tomcat-native-1.1.29-src.tar.gz cd tomcat-native-1.1.29-src/jni/native sudo ./configure --with-apr=/usr/local/apr --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64 ; sudo make ; sudo make install ls -ahl /usr/local/apr/lib

find / -type f -iname 'setenv.sh' vi setenv.sh # add the following line somewhere near the top export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'

not recommended but possible to also customize /usr/share/tomcat7/bin/catalina.sh

"the APR implementation, which uses the OpenSSL engine by default."

nano /var/lib/tomcat7/conf/server.xml

/>

tail -n50 -f /var/lib/tomcat7/logs/catalina.out


tomcat static content is pretty easy to setup... (hopefully tomcat6 and tomcat7 are about the same...)

/var/lib/tomcat6/conf/Catalina/localhost/ROOT.xml

ENSURE TOMCAT IS LISTENING ON PORT 80 /etc/tomcat6/server.xml

iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT

/var/lib/tomcat6/webapps/ROOT/filename.html

/etc/init.d/tomcat6 restart

http://10.10.10.21/filename.html


  • « File to array line to array get property substring by equals
  • mysql connect socket column headers insert »

Published

Mar 22, 2014

Category

linux

~189 words

Tags

  • content 5
  • install 58
  • libtcnative 1
  • linux 249
  • root 7
  • source 9
  • ssl 8
  • static 4
  • tomcat7 4