📄 netware.html
字号:
<li>
<p>Because Apache for NetWare is multithreaded, it does not
use a separate process for each request, as Apache does on some Unix
implementations. Instead there are only threads running: a parent
thread, and multiple child or worker threads which handle the requests.</p>
<p>Therefore the "process"-management directives are different:</p>
<p><code class="directive"><a href="../mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></code> -
Like the Unix directive, this controls how many requests
a worker thread will serve before exiting. The recommended default,
<code>MaxRequestsPerChild 0</code>, causes the thread to continue servicing
request indefinitely. It is recommended on NetWare, unless there is some
specific reason, that this directive always remain set to <code>0</code>.</p>
<p><code class="directive"><a href="../mod/mpm_common.html#startthreads">StartThreads</a></code> -
This directive tells the server how many threads it should start initially.
The recommended default is <code>StartThreads 50</code>.</p>
<p><code class="directive"><a href="../mod/mpm_common.html#minsparethreads">MinSpareThreads</a></code> -
This directive instructs the server to spawn additional worker threads
if the number of idle threads ever falls below this value. The recommended
default is <code>MinSpareThreads 10</code>.</p>
<p><code class="directive"><a href="../mod/mpm_common.html#maxsparethreads">MaxSpareThreads</a></code> -
This directive instructs the server to begin terminating worker threads
if the number of idle threads ever exceeds this value. The recommended
default is <code>MaxSpareThreads 100</code>.</p>
<p><code class="directive"><a href="../mod/mpm_netware.html#maxthreads">MaxThreads</a></code> -
This directive limits the total number of work threads to a maximum
value. The recommended default is <code>ThreadsPerChild 250</code>.</p>
<p><code class="directive"><a href="../mod/mpm_common.html#threadstacksize">ThreadStackSize</a></code> -
This directive tells the server what size of stack to use
for the individual worker thread. The recommended default
is <code>ThreadStackSize 65536</code>.</p>
</li>
<li>
<p>The directives that accept filenames as arguments must use
NetWare filenames instead of Unix names. However, because Apache
uses Unix-style names internally, forward slashes must be used
rather than backslashes. It is recommended that all rooted file paths
begin with a volume name. If omitted, Apache will assume the
<code>SYS:</code> volume which may not be correct.</p>
</li>
<li>
<p>Apache for NetWare has the ability to load modules at
runtime, without recompiling the server. If Apache is
compiled normally, it will install a number of optional
modules in the <code>\Apache2\modules</code> directory.
To activate these, or other modules, the <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> directive
must be used. For example, to active the status module, use
the following:</p>
<div class="example"><p><code>
LoadModule status_module modules/status.nlm
</code></p></div>
<p>Information on <a href="../mod/mod_so.html#creating">creating loadable
modules</a> is also available.</p>
</li>
</ul>
<h3><a name="use-add" id="use-add">Additional NetWare specific directives:</a></h3>
<ul>
<li><code class="directive"><a href="../mod/core.html#cgimapextension">CGIMapExtension</a></code> -
This directive maps a CGI file extension to a script interpreter.</li>
</ul>
<ul>
<li><code class="directive"><a href="../mod/mod_nw_ssl.html#securelisten">SecureListen</a></code> -
Enables SSL encryption for a specified port.</li>
</ul>
<ul>
<li><code class="directive"><a href="../mod/mod_nw_ssl.html#nwssltrustedcerts">NWSSLTrustedCerts</a></code> -
Adds trusted certificates that are used to create secure connections to proxied servers.</li>
</ul>
<ul>
<li><code class="directive"><a href="../mod/mod_nw_ssl.html#nwsslupgradeable">NWSSLUpgradeable</a></code> -
Allow a connection created on the specified address/port to be upgraded to an SSL connection.</li>
</ul>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="comp" id="comp">Compiling Apache for NetWare</a></h2>
<p>Compiling Apache requires MetroWerks CodeWarrior 6.x or higher. Once
Apache has been built, it can be installed to the root of any NetWare
volume. The default is the <code>sys:/Apache2</code> directory.</p>
<p>Before running the server you must fill out the <code>conf</code>
directory. Copy the file <code>HTTPD-STD.CONF</code> from the distribution
<code>conf</code> directory and rename it to <code>HTTPD.CONF</code>.
Edit the <code>HTTPD.CONF</code> file searching for all <code>@@Value@@</code>
markers and replacing them with the appropriate setting. Copy over
the <code>conf/magic</code>和<code>conf/mime.types</code> files as well.
Alternatively, a complete distribution can be built by including the keyword
<code>install</code> when invoking the makefiles.</p>
<h3><a name="comp-req" id="comp-req">Requirements:</a></h3>
<p>The following development tools are required to build
Apache 2.0 for NetWare:</p>
<ul>
<li>Metrowerks CodeWarrior 6.0 or higher with the
<a href="http://developer.novell.com/ndk/cwpdk.htm">NetWare PDK 3.0</a>
or higher.</li>
<li><a href="http://developer.novell.com/ndk/libc.htm">NetWare Libraries
for C (LibC)</a></li>
<li><a href="http://developer.novell.com/ndk/cldap.htm">LDAP Libraries
for C</a></li>
<li><a href="http://www.gzip.org/zlib/">ZLIB Compression Library source code</a></li>
<li>AWK utility (awk, gawk or similar). AWK can be downloaded from
<a href="http://developer.novell.com/ndk/apache.htm">http://developer.novell.com/ndk/apache.htm</a>.
The utility must be found in your windows path and must be named <code>awk.exe</code>.</li>
<li>To build using the makefiles, you will need GNU make version 3.78.1 (GMake) available at
<a href="http://developer.novell.com/ndk/apache.htm">http://developer.novell.com/ndk/apache.htm</a>.</li>
</ul>
<h3><a name="comp-make" id="comp-make">Building Apache using the NetWare makefiles:</a></h3>
<ul>
<li>Set the environment variable <code>NOVELLLIBC</code> to the
location of the NetWare Libraries for C SDK, for example:
<div class="example"><p><code>Set NOVELLLIBC=c:\novell\ndk\libc</code></p></div>
</li>
<li>Set the environment variable <code>METROWERKS</code> to the
location where you installed the Metrowerks CodeWarrior compiler,
for example:
<div class="example"><p><code>Set METROWERKS=C:\Program Files\Metrowerks\CodeWarrior</code></p></div>
If you installed to the default location <code>C:\Program
Files\Metrowerks\CodeWarrior</code>, you don't need to set this.</li>
<li>Set the environment variable <code>LDAPSDK</code> to the
location where you installed the LDAP Libraries for C, for example:
<div class="example"><p><code>Set LDAPSDK=c:\Novell\NDK\cldapsdk\NetWare\libc</code></p></div>
</li>
<li>Set the environment variable <code>ZLIBSDK</code> to the
location where you installed the source code for the ZLib Library,
for example:
<div class="example"><p><code>Set ZLIBSDK=D:\NOVELL\zlib</code></p></div>
</li>
<li>Set the environment variable <code>AP_WORK</code> to the full path of
the <code>httpd</code> source code directory.
<div class="example"><p><code>Set AP_WORK=D:\httpd-2.0.x</code></p></div>
</li>
<li>Set the environment variable <code>APR_WORK</code> to the full path of
the <code>apr</code> source code directory. Typically <code>\httpd\srclib\apr</code>
but the APR project can be outside of the httpd directory structure.
<div class="example"><p><code>Set APR_WORK=D:\apr-1.x.x</code></p></div>
</li>
<li>Set the environment variable <code>APU_WORK</code> to the full path of
the <code>apr-util</code> source code directory. Typically <code>\httpd\srclib\apr-util</code>
but the APR-UTIL project can be outside of the httpd directory structure.
<div class="example"><p><code>Set APU_WORK=D:\apr-util-1.x.x</code></p></div>
</li>
<li>Make sure that the path to the AWK utility and the GNU make utility
(<code>gmake.exe</code>) have been included in the system's
<code>PATH</code> environment variable.</li>
<li>Download the source code and unzip to an appropriate directory on
your workstation.</li>
<li>Change directory to <code>\httpd-2.0</code> and build the prebuild utilities
by running "<code>gmake -f nwgnumakefile prebuild</code>". This target will create
the directory <code>\httpd-2.0\nwprebuild</code> and copy each of the utilities
to this location that are necessary to complete the following build steps.
</li>
<li>Copy the files <code>\httpd-2.0\nwprebuild\GENCHARS.nlm</code>和<code>\httpd-2.0\nwprebuild\DFTABLES.nlm</code> to the <code>SYS:</code> volume of a
NetWare server and run them using the following commands:
<div class="example"><p><code>
SYS:\genchars > sys:\test_char.h<br />
SYS:\dftables sys:\chartables.c<br />
</code></p></div>
</li>
<li>Copy the files <code>test_char.h</code>和<code>chartables.c</code>
to the directory <code>\httpd-2.0\os\netware</code> on the build machine.</li>
<li>Change directory to <code>\httpd-2.0</code> and build Apache by running
"<code>gmake -f nwgnumakefile</code>". You can create a distribution directory by
adding an install parameter to the command, for example:
<div class="example"><p><code>gmake -f nwgnumakefile install</code></p></div>
</li>
</ul>
<h3><a name="comp-add" id="comp-add">Additional make options</a></h3>
<ul>
<li><code>gmake -f nwgnumakefile</code><p>Builds release versions of all of the
binaries and copies them to a <code>\release</code> destination directory.</p></li>
<li><code>gmake -f nwgnumakefile DEBUG=1</code><p>Builds debug versions of all of the
binaries and copies them to a <code>\debug</code> destination directory.</p></li>
<li><code>gmake -f nwgnumakefile install</code><p>Creates a complete Apache
distribution with binaries, docs and additional support files in a
<code>\dist\Apache2</code> directory.</p></li>
<li><code>gmake -f nwgnumakefile prebuild</code><p>Builds all of the prebuild utilities
and copies them to the <code>\nwprebuild</code> directory.</p></li>
<li><code>gmake -f nwgnumakefile installdev</code><p>Same as install but also creates a
<code>\lib</code>和<code>\include</code> directory in the destination directory
and copies headers and import files.</p></li>
<li><code>gmake -f nwgnumakefile clean</code><p>Cleans all object files and binaries
from the <code>\release.o</code>或<code>\debug.o</code> build areas depending on whether
<code>DEBUG</code> has been defined.</p></li>
<li><code>gmake -f nwgnumakefile clobber_all</code><p>Same as clean and also deletes
the distribution directory if it exists.</p></li>
</ul>
<h3><a name="comp-add-env" id="comp-add-env">Additional environment variable options</a></h3>
<ul>
<li>To build all of the experimental modules, set the environment
variable <code>EXPERIMENTAL</code>:
<div class="example"><p><code>Set EXPERIMENTAL=1</code></p></div>
</li>
<li>To build Apache using standard BSD style sockets rather than
Winsock, set the environment variable <code>USE_STDSOCKETS</code>:
<div class="example"><p><code>Set USE_STDSOCKETS=1</code></p></div>
</li>
</ul>
<h3><a name="comp-mod_ssl" id="comp-mod_ssl">Building mod_ssl for the NetWare platform</a></h3>
<p>By default Apache for NetWare uses the built-in module
<code class="module"><a href="../mod/mod_nw_ssl.html">mod_nw_ssl</a></code> to provide SSL services. This module
simply enables the native SSL services implemented in NetWare OS
to handle all encryption for a given port. Alternatively, mod_ssl
can also be used in the same manner as on other platforms.</p>
<p>Before mod_ssl can be built for the NetWare platform, the OpenSSL
libraries must be provided. This can be done through the following
steps:</p>
<ul>
<li>Download the latest NetWare patch for OpenSSL from the
<a href="http://www.openssl.org/contrib/">OpenSSL Contribution</a>
page.</li>
<li>Download the corresponding OpenSSL source code from the
<a href="http://www.openssl.org/source/">OpenSSL Source</a>
page.</li>
<li>At the root of the OpenSSL source directory, apply the NetWare
patch using the "patch" utility, for example:
<div class="example"><p><code>patch -p 1 -i netwarepatch-0.9.7g.diff</code></p></div></li>
<li>Edit the file <code>NetWare/set_env.bat</code> and modify any
tools and utilities paths so that they correspond to your build
environment.</li>
<li>From the root of the OpenSSL source directory, run the following
scripts:
<div class="example"><p><code>
Netware/set_env netware-libc<br />
Netware/build netware-libc
</code></p></div></li>
<li>Before building Apache, set the environment variable
<code>OSSLSDK</code> to the full path to the root of the openssl
source code directory.
<div class="example"><p><code>Set OSSLSDK=d:\openssl-0.9.7x</code></p></div></li>
</ul>
</div></div>
<div id="footer">
<p class="apache">本文允许自由使用、分发、转载,但必须保留译者署名;详见:<a href="../translator_announcement.html#announcement">译者声明</a>。</p>
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -