blob: 970d1a144dc53b201ba577e46b8250aecb24361d [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Apache Rivet Installation</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="prev" href="index.html" title="Apache Rivet"><link rel="next" href="directives.html" title="Rivet Apache Directives"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet Installation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="directives.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="section" title="Apache Rivet Installation"><div class="titlepage"><div><div><hr><h2 class="title" style="clear: both"><a name="installation"></a>Apache Rivet Installation</h2></div></div></div><div class="procedure"><ol class="procedure" type="1"><li class="step" title="Check Dependencies"><p class="title"><b>Check Dependencies</b></p><p style="width:90%">
To install Rivet, you will need Tcl 8.4 or greater. Rivet can be compiled to work
with either Apache 1.3.xx or Apache 2.2.xx server.
It is known to run on Linux, FreeBSD, OpenBSD, Solaris and HPUX. Windows NT is also possible
- please see the directions in the distribution.
</p></li><li class="step" title="Get Rivet"><p class="title"><b>Get Rivet</b></p><p style="width:90%">
Download the sources at <a class="ulink" href="http://tcl.apache.org/rivet/download.html" target="_top">http://tcl.apache.org/rivet/download.html</a>. Currently
the only way to obtain Rivet. In the future, we hope to have a FreeBSD port, Debian package, RPM's, and windows
binaries.
</p></li><li class="step" title="Install Tcl"><p class="title"><b>Install Tcl</b></p><p style="width:90%">
If you don't have Tcl already, you need it! If you already
have it, you should just be able to use your system Tcl as
long as it is recent. You can tell Rivet build scripts where Tcl is via
the --with-tcl option to <span style="font-family:monospace"><span class="command"><strong>configure</strong></span></span> (see below).
</p></li><li class="step" title="Get and Install Apache Sources"><p class="title"><b>Get and Install Apache Sources</b></p><p style="width:90%">
Rivet needs some Apache include (.h) files in order to build. The easiest way
to get them is to download the source code of the Apache web server, although some systems
(Debian GNU/Linux for example) make it possible to install only the headers and other
development files. If you intend to build Rivet statically (compiled into the Apache web
server instead of loaded dynamically), you definitely need the sources.
We recommend that you build Rivet as a loadable shared library, for maximum flexibility,
meaning that you also build Apache to be able to load modules. Other than that,
the default Apache install is fine. We will tell Rivet where it is located via the
--with-apxs option to <span style="font-family:monospace"><span class="command"><strong>configure</strong></span></span> (see below).
</p><p style="width:90%">
The source code for the Apache web server may be found by
following the links here: <a class="ulink" href="http://httpd.apache.org/" target="_top">http://httpd.apache.org/</a>.
</p></li><li class="step" title="Uncompress Sources"><p class="title"><b>Uncompress Sources</b></p><p style="width:90%">
We will assume that you have Apache installed at this point.
You must uncompress the Rivet sources in the directory where you
wish to compile them.
</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">gunzip rivet-X.X.X.tar.gz
tar -xvf rivet-X.X.X.tar.gz</pre><p style="width:90%">
</p></li><li class="step" title="Building Rivet"><p class="title"><b>Building Rivet</b></p><ol type="a" class="substeps"><li class="step" title="Step 6.a"><p style="width:90%">
On Linux or Unix systems, Rivet uses the standard <span style="font-family:monospace"><span class="command"><strong>./configure ; make ; make install</strong></span></span> technique.
</p><p style="width:90%">
There are several rivet specific options to configure that might be useful (or needed):
</p><div class="variablelist"><dl><dt><span class="term">--with-tcl</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
This points to the directory where the
<code class="filename">tclConfig.sh</code> file is located.
</div></div></dd><dt><span class="term">--with-tclsh</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">This points to the location of the
<code class="filename">tclsh</code> executable.</div></div></dd><dt><span class="term">--with-apxs</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">The location of the <code class="filename">apxs</code>
program that provides information about the
configuration and compilation options of Apache modules.</div></div></dd><dt><span class="term">--with-apache-version=[1|2]</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
This option tells the build scripts whether you want to build Rivet for the
Apache 1.x or Apache 2.x server.
</div></div></dd><dt><span class="term">--with-apache-include[=DIR]</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
Locates the Apache include files on your computer, if they're not in standard directory.
</div></div></dd><dt><span class="term">--enable-version-display=[yes|no]</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
This option enables Rivet to display its version in the logfiles when Apache is started.
The default is to keep Rivet version hidden.
</div></div></dd><dt><span class="term">--with-rivet-target-dir=DIR</span></dt><dd><div style="padding:4 ; margin-top:3 ; margin-bottom:3 ; width:75%"><div style="margin-bottom:1.5ex ; padding .5ex">
This option tells the install script where Rivet's Tcl packages have to be copied.
</div></div></dd></dl></div><p style="width:90%">
</p><p style="width:90%">
Example: configuring the build system to compile Rivet for an apache 2.x server, using tcl8.5 and
specifying a custom name for the apxs program.
</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">
./configure --with-tcl=/usr/lib/tcl8.5/ --with-tclsh=/usr/bin/tclsh8.5 \
--with-apxs=/usr/bin/apxs2 --with-apache=/usr --with-apache-version=2
</pre></li><li class="step" title="Run make"><p class="title"><b>Run make</b></p><p style="width:90%">
At this point, you are ready to run make, which should
run to completion without any errors (a warning or two
is ok, generally).
</p></li><li class="step" title="Install"><p class="title"><b>Install</b></p><p style="width:90%">
Now, you are ready to run the <span style="font-family:monospace"><span class="command"><strong>make
install</strong></span></span> to install the resulting files.
This should copy the shared object (like
<code class="filename">mod_rivet.so</code>, if one was
successfully created, into Apache's
<code class="filename">libexec</code> directory, as well as
install some support scripts and various code.
</p></li></ol></li><li class="step" title="Apache Configuration Files"><p class="title"><b>Apache Configuration Files</b></p><p style="width:90%">
Rivet is relatively easy to configure - we start off by
adding the module itself:
</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">LoadModule rivet_module <em class="replaceable"><code>/usr/lib/apache2/modules/mod_rivet.so</code></em>
</pre><p style="width:90%">
This tells Apache to load the Rivet shared object, wherever
it happens to reside on your file system. Now we have to
tell Apache what kind of files are "Rivet" files and how to
process them:
</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">AddType application/x-httpd-rivet .rvt
AddType application/x-rivet-tcl .tcl</pre><p style="width:90%">
These tell Apache to process files with the
<code class="filename">.rvt</code> and <code class="filename">.tcl</code>
extensions as Rivet files.
</p><p style="width:90%">
The characters encoding can be changed using the <span style="font-family:monospace"><span class="command"><strong>header type</strong></span></span> command,
but you can also change the default charset for the whole site:
</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">AddType 'application/x-httpd-rivet;charset=utf-8' rvt</pre><p style="width:90%">
All the pages generated by Rivet on this site will be sent with a
<span style="font-family:monospace"><span class="command"><strong>Content-Type:'text/html;charset=utf-8'</strong></span></span> header.
</p><p style="width:90%">You may also wish to use Rivet files as index files for
directories. In that case, you would do the following:</p><pre style="background:#ccc; margin: 2ex; margin-right: 10%; padding: 1ex; border: dashed black 1px ; white-space: pre; font-family: monospace; font-size: 90%;" class="programlisting">DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</pre><p style="width:90%">
For other directives that Rivet provides for Apache
configuration, please see <a class="xref" href="directives.html" title="Rivet Apache Directives">the section called &#8220;Rivet Apache Directives&#8221;</a>.
</p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="directives.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Apache Rivet </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Rivet Apache Directives</td></tr></table></div></body></html>