File: index.html

package info (click to toggle)
tomcat-native 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,956 kB
  • sloc: ansic: 12,920; sh: 3,809; java: 2,432; xml: 709; perl: 327; makefile: 46
file content (193 lines) | stat: -rw-r--r-- 9,948 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="./images/docs-stylesheet.css" rel="stylesheet" type="text/css"><link href="./images/style.css" rel="stylesheet" type="text/css"><title>The Apache Tomcat Native Library 1.3 - Documentation Index</title><meta name="author" content="Jean-Frederic Clere"></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="https://tomcat.apache.org/"><img alt="Tomcat Home" src="./images/tomcat.png"></a></div><div style="height: 1px;"></div><div class="asfLogo noPrint"><a href="http://www.apache.org/" target="_blank"><img src="./images/asf-logo.svg" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"></a></div><h1>The Apache Tomcat Native Library 1.3</h1><div style="height: 1px;"></div><div style="clear: left;"></div></div></div></div></header><div id="middle"><div><div id="mainLeft" class="noprint"><div><nav><div><h2><strong>Links</strong></h2><ul><li><a href="index.html">Docs Home</a></li></ul></div><div><h2><strong>Miscellaneous Documentation</strong></h2><ul><li><a href="miscellaneous/changelog.html">Changelog</a></li><li><a href="miscellaneous/tls-renegotiation.html">TLS renegotiation</a></li></ul></div><div><h2><strong>News</strong></h2><ul><li><a href="news/2024.html">2024</a></li></ul></div></nav></div></div><div id="mainRight"><div id="content"><h2>Documentation Index</h2><h3 id="Introduction">Introduction</h3><div class="text">

  <p>
    The Apache Tomcat Native Library is an optional component for use with
    Apache Tomcat that allows Tomcat to use certain native resources
    for performance, compatibility, etc.
  </p>

  <p>
    Specifically, the Apache Tomcat Native Library gives Tomcat access to
    the Apache Portable Runtime (APR) library's network connection (socket)
    implementation and random-number generator.
    See the Apache Tomcat documentation for more information on how to
    configure Tomcat to use the APR connector.
  </p>

  <p>
    Features of the APR connector:
  </p>
  <ul>
    <li>Non-blocking I/O for Keep-Alive requests (between requests)</li>
    <li>Uses OpenSSL for TLS/SSL capabilities (if supported by linked APR library)</li>
    <li>FIPS 140-2 support for TLS/SSL (if supported by linked OpenSSL library)</li>
    <li>Support for IPv4, IPv6 and Unix Domain Sockets</li>
  </ul>

</div><h3 id="Headlines">Headlines</h3><div class="text">
<ul>

<li><a href="news/2024.html#20240208">12 February 2024 - <b>TC-Native-1.3.0
released</b></a>
<p>The Apache Tomcat team is proud to announce the immediate availability of
Tomcat Native 1.3.0 Stable.</p>
<p>
The sources and the binaries for selected platforms are available from the
<a href="../download-native.cgi">Download page</a>.
</p>
<p>
Please see the <a href="miscellaneous/changelog.html">Changelog</a> for a full
list of changes.
</p>
</li>
</ul>
</div><h3 id="Building">Building</h3><div class="text">
<div class="subsection"><h4 id="Requirements">Requirements</h4><div class="text">
    <p>
      Build tc-native requires three components to be installed:
    </p>
      <ul>
        <li>APR library</li>
        <li>OpenSSL libraries</li>
        <li>Java SE Development Kit (JDK)</li>
      </ul>

    <p>
      In debian based Linux those dependencies could be installed by something like:
    </p>
    <div class="codeBox"><pre><code>apt-get install libapr1.0-dev libssl-dev</code></pre></div>
    <p>
      In rpm based Linux those dependencies could be installed by something like:
    </p>
    <div class="codeBox"><pre><code>yum install apr-devel openssl-devel</code></pre></div>
</div></div>

<div class="subsection"><h4 id="Building/UNIX">UNIX</h4><div class="text">
  <p>
    On all the POSIX systems (Linux, Solaris, HP-UX, AIX etc...) a well-known
    configure and make is used to build tc-native.<br>
    In the jni/native runs:
  </p>
    <div class="codeBox"><pre><code>./configure --help</code></pre></div>
    <p>to read the description of all the parameters.</p>
    <div class="codeBox"><pre><code>./configure --with-apr=$HOME/APR \
            --with-java-home=$JAVA_HOME \
            --with-ssl=$HOME/OPENSSL \
            --prefix=$CATALINA_HOME</code></pre></div>
  <p>
    to create the includes and makefiles to be able to build tc-native.<br>
    Where:<br>
    <code>$HOME/APR</code> is something like /usr/bin/apr-1-config or the path where apr is
    installed.<br>
    <code>$JAVA_HOME</code> is something /home/jfclere/JAVA/jdk1.7.0_80 path to a JDK
    installation. Any JDK should work but it is advisable to use the same
    JVM version the JVM you use with Tomcat.<br>
    <code>$HOME/OPENSSL</code> is the path where OpenSSL is installed.<br>
    <code>$CATALINA_HOME</code> is the path where the produced libraries will be
    installed. Something like $HOME/apache-tomcat-8.0.47/<br>
    <br>
    The configure is able to guess most of OpenSSL standard installations.
    So most of the time the following will be enough:
  </p>
    <div class="codeBox"><pre><code>./configure --with-apr=/usr/bin/apr-1-config \
            --with-java-home=/home/jfclere/JAVA/jdk1.7.0_80/ \
            --with-ssl=yes \
            --prefix=$CATALINA_HOME</code></pre></div>
  <p>
    To build the libraries and install them:
  </p>
  <div class="codeBox"><pre><code>make &amp;&amp; make install</code></pre></div>
  <p>
    The libraries will be found in $CATALINA_HOME/lib
  </p>
</div></div>

<div class="subsection"><h4 id="Building/Windows">Windows</h4><div class="text">
  <p>
   Download the Windows sources of tc-native and extract them.
  </p>
  <p>
   Obtain the Windows sources for
   <a href="http://apr.apache.org/download.cgi">APR</a> and
   <a href="https://www.openssl.org/source/">OpenSSL</a>. Apply the patches from
   native/srclib and build APR and OpenSSL for your platform (X86 or X64).  
  </p>
  <p>
    Build with <div class="codeBox"><pre><code>nmake -f NMAKEMakefile WITH_APR=... WITH_OPENSSL=... APR_DECLARE_STATIC=1</code></pre></div>
  </p>
  <p>
    More detailed instructions including the steps to create a standard release
    distribution are provided on the <a href="https://cwiki.apache.org/confluence/display/TOMCAT/Building+the+Tomcat+Native+Connector+binaries+for+Windows">Wiki</a>.
  </p>
</div></div>

</div><h3 id="Install_and_tests">Install and tests</h3><div class="text">
  <div class="subsection"><h4 id="Configuring_Tomcat">Configuring Tomcat</h4><div class="text">
    <p>
      Apache Tomcat comes with the <code>AprLifecycleListener</code> enabled
      by default. Still, you should check your <code>conf/server.xml</code>
      to ensure that something like the following is present, and uncommented:
    </p>

    <div class="codeBox"><pre class="wrap"><code>&lt;Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /&gt;</code></pre></div>
    <p>
      Please see the Apache Tomcat documentation for configuration specifics.
    </p>

    <p>
      When using Unix Domain Sockets a cleanup is registered to delete the
      socket on destruction of the socket, or shutdown of the application.
      Should the application terminate abnormally, the socket deletion will
      need to be handled by the caller or by the administrator.
    </p>

  </div></div>

<div class="subsection"><h4 id="Install_and_tests/UNIX">UNIX</h4><div class="text">
  <p>
   Edit $CATALINA_HOME/bin/setenv.sh (creating the file if necessary) and add
   the path to the tc-native libraries to LD_LIBRARY_PATH. Something like:
  </p>
  <div class="codeBox"><pre><code>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib
export LD_LIBRARY_PATH</code></pre></div>
  <p>
   Start tomcat and check for the messages like this ones:
  </p>
   <div class="codeBox"><pre class="wrap"><code>Nov 29, 2020 12:27:41 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.x.y.
Nov 29, 2020 12:27:41 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
Nov 29, 2020 12:27:41 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080</code></pre></div>

  <p>
    Refer to the tomcat documentation to configure the connectors (See
    <a href="http://tomcat.apache.org/tomcat-11.0-doc/apr.html">Tomcat 11.0.x</a>,
    <a href="http://tomcat.apache.org/tomcat-10.1-doc/apr.html">Tomcat 10.1.x</a> and
    <a href="http://tomcat.apache.org/tomcat-9.0-doc/apr.html">Tomcat 9.0.x</a>)
  </p>
</div></div>

<div class="subsection"><h4 id="Install_and_tests/Windows">Windows</h4><div class="text">
  <p>
    Edit $CATALINA_BASE\bin\setenv.bat (creating the file if necessary) and add
    the path to the tc-native libraries, apr and OpenSSL to PATH. For example:
  </p>

  <div class="codeBox"><pre class="wrap"><code>set PATH=%PATH;C:\cygwin\home\support\tomcat-native-current-win32-src\jni\native\Debug;C:\cygwin\home\support\tomcat-native-current-win32-src\jni\apr\Debug;C:\OpenSSL\lib\VC</code></pre></div>
  <p>
    Start tomcat and check for the messages like this ones:
  </p>
  <div class="codeBox"><pre class="wrap"><code>Nov 29, 2020 2:48:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.x.y.
Nov 29, 2020 2:48:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true], UDS [false].
Nov 29, 2020 2:48:18 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080</code></pre></div>

</div></div>

</div></div></div></div></div><footer><div id="footer">
    Copyright &copy; 2008-2024, The Apache Software Foundation
  </div></footer></div></body></html>