After reading “Introducing Apache Tomcat 6″ presentation by Mladen Turk I decided to enable Apache Portable Runtime (APR) native library for Tomcat. It was supposed to be as easy as
view sourceprint?
1.sudo ./configure
2.sudo make
3.sudo make install
but as you may guess, it was a little bit more than that.
1. Installing Apache APR.
“Most Linux distributions will ship packages for APR” – those of Linode don’t, I had a barebone Ubuntu 10.10 box without even "gcc" and "make", let alone Apache APR. Thanks God, networking was not an issue, unlike last time.
view sourceprint?1.wget http://apache.spd.co.il//apr/apr-1.4.2.tar.gz
2.tar -xzf apr-1.4.2.tar.gz
3.rm apr-1.4.2.tar.gz
4.cd apr-1.4.2/
5.sudo apt-get install make
6.sudo ./configure
7.sudo make
8.sudo make install
2. Installing Tomcat Native.
view sourceprint?
1.wget http://off.co.il/apache//tomcat/tomcat-connectors/native/1.1.20/source/tomcat-native-1.1.20-src.tar.gz
2.tar -xzf tomcat-native-1.1.20-src.tar.gz
3.rm tomcat-native-1.1.20-src.tar.gz
4.cd tomcat-native-1.1.20-src/jni/native
5.sudo ./configure --with-apr=/usr/local/apr
The result was
view sourceprint?
1.checking build system type... x86_64-unknown-linux-gnu
2...
3.checking for APR... yes
4...
5.checking for JDK location (please wait)... checking Try to guess JDK location...
6.configure: error: can't locate a valid JDK location
Ouch! "Can't locate a valid JDK location"? On my machine?
view sourceprint?
1.$ which java
2./home/user/java/jdk/bin/java
3.$ echo $JAVA_HOME
4./home/user/java/jdk
5.$ java -version
6.java version "1.6.0_24"
7.Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
8.Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
But for some reason "tomcat-native-1.1.20-src/jni/native/configure" script didn’t see my "JAVA_HOME" variable no matter what and even installing "sun-java6-jdk" didn’t help much. After patching the "configure" script to dump locations it was looking for “valid JDK” I had:
view sourceprint?
01...
02.configure: [/usr/local/1.6.1]
03.configure: [/usr/local/IBMJava2-1.6.0]
04.configure: [/usr/local/java1.6.0]
05.configure: [/usr/local/java-1.6.0]
06.configure: [/usr/local/jdk1.6.0]
07.configure: [/usr/local/jdk-1.6.0]
08.configure: [/usr/local/1.6.0]
09.configure: [/usr/local/IBMJava2-1.6]
10.configure: [/usr/local/java1.6]
11.configure: [/usr/local/java-1.6]
12.configure: [/usr/local/jdk1.6]
13.configure: [/usr/local/jdk-1.6]
14...
Ok then, here you have it now:
view sourceprint?
1.sudo ln -s ~/java/jdk/ /usr/local/jdk-1.6
2.sudo ./configure --with-apr=/usr/local/apr
3.sudo make
4.sudo make install
And with
view sourceprint?
1...
2.export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
3...
I now had a beautiful log message in "catalina.out":
view sourceprint?
1...
2.Mar 7, 2011 11:51:02 PM org.apache.catalina.core.AprLifecycleListener init
3.INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
4.Mar 7, 2011 11:51:02 PM org.apache.catalina.core.AprLifecycleListener init
5.INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
6.Mar 7, 2011 11:51:03 PM org.apache.coyote.AbstractProtocolHandler init
7...
s soon as "evgeny-goldin.org" moves to its new location on the brand-new Linode box it will benefit from this performance optimization. I’ll describe the migration process and reasons for it a bit later, once it is done.
From http://evgeny-goldin.com/blog/ubuntu-installing-apr-tomcat/
原文地址:http://java.dzone.com/articles/ubuntu-installing-apache
分享到:
相关推荐
In this fast-paced book on the Docker open standards platform for developing, packaging and running portable distributed applications, Deepak Vorha discusses how to build, ship and run applications ...
Chapter 2: Installing and Running Apache Thrift Chapter 3: Running Your First Apache Thrift Service and Client Chapter 4: Understanding How Apache Thrift Works Chapter 5: Generating and Running Code ...
Fully updated for Windows Server 2012 R2! Prepare for Microsoft Exam 70-410 – and help demonstrate your real-world mastery of implementing and configuring core services in Windows Server 2012 R2. ...
Learning Apache Karaf will benefit all Java developers and system administrators who need to develop for and/or operate Karaf’s OSGi-based runtime. Basic knowledge of Java is assumed. Table of ...
包括 Repository Database (oracle 11gR2)的安装,静默方式安装 EM Grid Control 10.2.0.3 并升级到10.2.0.5, Grid Control 配置,安装 Grid Control Agent 及 Grid Control OMS's 和 Agent 的中间补丁 OPatch 升级...
ESP-IDF环境安装文件,含esp-idf-v4.0.1资源包、Git-2.35.1.2-64-bit安装包、python-3.7
文件列表如下: Installing TensorFlow for Java _ TensorFlow.pdf; libtensorflow_jni-cpu-windows-x86_64-1.4.1.zip; libtensorflow-1.4.1.jar;
Chapter 2 - Installing Ubuntu Linux Chapter 3 - Interface Basics Part II - Configuration Chapter 4 - System Configuration Chapter 5 - Network Configuration Chapter 6 - Software Management Chapter 7 - ...
Installing and configuring Ubuntu to ensure secure installations Virtual Ubuntu and LDAP configuration Full network and web services management What you’ll learn Administer, install, and configure ...
70 410认证考试辅导书,写的比较浅显易懂,是英文的。
官方原版一键注册tomcat为windows服务,tomcat8w.exe界面更改tomcat内存大小,开机自启,延迟自启 D:\x\develop\apache-tomcat-8.5.34\bin>service.bat install Installing the service 'Tomcat8' ...
Contents Chapter 1: Introducing ArcGIS Engine Chapter 2: ArcGIS software architecture Chapter 3: Developing ...Appendix D: Installing ArcGIS Engine Runtime on Windows, Solaris, and Linux Glossary Index
OpenERP Installing Ubuntu9.04
Time for action – installing Apache Tomcat on Ubuntu 42 Time for action – configuring Tomcat as a service on Ubuntu 45 Installing GeoServer 48 Time for action – deploying GeoServer on Tomcat 49 ...
ubuntu Installing swat for 802.11
1 下载并准备 首先,我们需要到官网下载Tomcat。 将Tomcat下载Windows的zip文件下载到本地: 接下来,我们将下载的zip文件解压出来,如下: ...Installing the service 'Tomcat8' ... Using CATALINA_H
Updated for the latest version of Tomcat, this new edition offers a complete guide to installing, configuring, maintaining and securing this servlet container. In fact, with such a wealth of new ...
Chapter 3 Installing Ubuntu Chapter 4 Post-Installation Configuration Chapter 5 First Steps with Ubuntu Chapter 6 The X Window System Chapter 7 Managing Software Chapter 8 On the Internet: ...
linux subversion的文件及依赖包,请看我的Linux subversion安装博客再下载
win8系统无法收到win10的推送,需要安装三个更新,这是其中的一个,X86和X64的都有了