Linux Installing APR and Tomcat Native Library on Tomcat 7.0
- The objective: install APR and Tomcat Native Library on Tomcat 7.0.41. I am using Icetea java 1.6 open JDK as when I download JAVA from Oracle, it has rt.jar missing on 1.6 and 1.7
- The linux platform is RHEL 6.3
- I download and compile tar source of APR (1.5) and APR util (1.5.3). I found that when I use yum install, the apr library is incompleted.
- Need to yum install java openjdk. I am using 1.6.
- Untar APR and follow readme to configure and compile. make && make install
- Follow this (Eng) and this (S.Chi) to configure, compile and install Tomcat Native Library
- The command I use is: ./configure --with-apr=/usr/local/apr --with-java-home=/usr/lib/jvm/java-openjdk/
- In setenv.sh (under <tomcat_dir>/bin, if not exists, create one), I set the following:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
- CATALINA_OPTS="-server -Xms6G -Xmx6G $CATALINA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC"
- Notice in LD_LIBRARY_PATH, you need to "define the path of APR", but this sentence is misleading. What you really need is to "define the lib path of APR", so it is /usr/local/apr/lib, not /usr/local/apr
- Restart tomcat and you should be fine.