File: install.xml

package info (click to toggle)
libapache2-mod-rivet 2.3.3-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,156 kB
  • ctags: 1,093
  • sloc: xml: 7,696; tcl: 6,939; ansic: 5,682; sh: 4,862; makefile: 199; sql: 91; lisp: 78
file content (253 lines) | stat: -rw-r--r-- 10,412 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<section id="installation">
    <title>Apache Rivet Installation</title>
    <procedure>
        <para> 
            Rivet 2.2 runs with the Apache 2.2.x and 2.4.x HTTP web server. 
            It is known to build and run on various Linux distributions 
            (Debian &amp; Ubuntu, Redhat, SuSE and CentOS), FreeBSD and OpenBSD. For some
            of these Unix-like operative systems 
            <ulink url="http://tcl.apache.org/rivet/html/download.html">binary packages</ulink> 
            are already available for download.
        </para>
        <para>
            Currently there is no way to run Apache Rivet 2.2 on Windows&copy; because            
            Rivet currently requires the 
            <ulink url="http://httpd.apache.org/docs/2.2/mod/prefork.html">prefork</ulink>, which
            is supported only on Unix/Linux systems. Efforts are under way to extend the support to the 
            <ulink url="http://httpd.apache.org/docs/2.2/mod/worker.html">worker</ulink> 
            and the
            <ulink url="http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html">winnt</ulink> MPMs.
            Check our
            <ulink url="http://tcl.apache.org/rivet/html/about.html">development mailing list</ulink>
            for the latests updates about Rivet development
        </para>
        <para>
            If you need to compile Apache Rivet yourself this is the procedure to follow
        </para>
        <step performance="required">
            <title>Install Tcl</title>
            <para>
                Installing Rivet is about endowing the Apache HTTP webserver with the ability
                of running scripts written with the Tcl programming language. 
                Therefore the 
                <ulink url="http://www.tcl.tk/">Tcl</ulink> 
                shell (<command>tclsh</command>), its runtime and  
                development libraries (&ge;8.5.10) have to be installed. Building Rivet you will 
                have to tell the scripts where the Tcl libraries are located via the
                <option>--with-tcl</option> option to <command>configure</command> (see below).
            </para>
			</step>
         <step>
            <title>Get Rivet</title>
            <para>
                Download the sources at <ulink url="http://tcl.apache.org/rivet/html/download.html"/>.  
            </para>
         </step>
         <step performance="optional">
            <title>Get and Install Apache Sources</title>
            <para>
                Rivet needs some of the include (.h) files shipped with the webserver source code. 
                The easiest way to get them is to download the Apache source.  
                If can build Rivet either statically (compiled into the Apache web
                server instead of loaded dynamically) or dynamically (as a loadable shared library).  
                We recommend that you build Rivet as a 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 
                <option>--with-apxs</option> option to <command>configure</command> (see below).
            </para>
            <para>
                The source code for the Apache web server may be found by following the links here: 
                <ulink url="http://httpd.apache.org/"/>.
            </para>
          </step>
          <step>
            <title>Uncompress Sources</title>
            <para>
              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.
              <programlisting>gunzip rivet-X.X.X.tar.gz
tar -xvf rivet-X.X.X.tar.gz</programlisting>
            </para>
          </step>
      <step>
	<title>Building Rivet</title>
	<substeps>
	  <step>
	    <para>
	       On Linux or Unix systems, Rivet uses the standard <command>./configure ; make ; make install</command>
	       sequence which installs to their target directories the Apache module, the binary libraries and the
	       Tcl code
	    </para>
	    <para>
	      There are several rivet specific options to configure that might be useful (or needed):
	      <variablelist>
		      <varlistentry>
		      <term>--with-tcl</term>
		      <listitem>
		          <para>
		              This points to the directory where the
		              <filename>tclConfig.sh</filename> file is located.
		          </para>
		      </listitem>
		  </varlistentry>
		  <varlistentry>
		  <term>--with-tclsh</term>
		  <listitem>
		    <para>This points to the location of the
		      <filename>tclsh</filename> executable.</para>
		  </listitem>
		</varlistentry>
		<varlistentry>
		  <term>--with-apxs</term>
		  <listitem>
		    <para>The location of the <filename>apxs</filename>
		      program that provides information about the
		      configuration and compilation options of Apache modules.</para>
		  </listitem>
		</varlistentry>
		<varlistentry>
		  <term>--with-apache-include[=DIR]</term>
		  <listitem>
		    <para>
			    Locates the Apache include files on your computer, if they're not in standard directory. 
		    </para>
		  </listitem>
		</varlistentry>
		<varlistentry>
		  <term>--enable-version-display=[yes|no]</term>
		  <listitem>
		    <para>
			This option enables Rivet to display its version in the logfiles when Apache is started. 
			The default is to keep Rivet version hidden.
		    </para>
		  </listitem>
		</varlistentry>
		<varlistentry>
		    <term>--with-rivet-target-dir=DIR</term>
		    <listitem>
			<para>
			    This option tells the install script where Rivet's Tcl packages have to be copied. 
			</para>
		    </listitem>
		</varlistentry>
		<varlistentry>
		    <term>--with-upload-dir=DIR</term>
		    <listitem>
		      <para>
		          Configures Rivet's default upload directory 
		      </para>
		    </listitem>
		</varlistentry>
		<varlistentry>
		    <term>--enable-head-requests</term>
		    <listitem>
		      <para>
		          By default HEAD requests don't go through the usual request processing which leads
		          to script execution and therefore resource consumption and Rivet returns a
		          standard hardcoded HTML header to save CPU time. --enable-head-requests
		          changes this default (see also <link linkend="directives">Rivet Directives</link>)
		      </para>
		    </listitem>
		</varlistentry>
		<varlistentry>
		    <term>--disable-rivet-commands-export</term>
		    <listitem>
		      <para>
		          By default Rivet's commands are put on the export list of the <code>::rivet</code>
		          namespace. With this option you may prevent it thus forcing the programmer to
		          fully qualify <link linkend="commands">these commands</link>
		      </para>
		    </listitem>
		</varlistentry>
		<varlistentry>
		    <term>--disable-import-rivet-commands</term>
		    <listitem>
		      <para>
		          Likewise commands in the Rivet's namespace when exported are then by default imported
		          into the global namespace for compatibility with previous version of Rivet.
		          (Enabling the import of Rivet's commands overrides the switch --disable-rivet-commands-export
		          and forces the export from <code>::rivet</code>). This switch overrides the default and
		          prevents the import into the global namespace 
		      </para>
		    </listitem>
		</varlistentry>
		
	      </variablelist>
	    </para>
	    <para>
		  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. 
	    </para>
	<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</programlisting>
	  </step>
	  <step>
	    <title>Run make</title>
	    <para>
	      At this point, you are ready to run make, which should
	      run to completion without any errors (a warning or two
	      is ok, generally).
	    </para>
	  </step>
	  <step>
	    <title>Install</title>
	    <para>
	      Now, you are ready to run the
	    </para>
	    <programlisting>make install</programlisting>
	    <para> 
	       to install the resulting files. The <code>install</code> target
	       actually fires the <code>install-binaries</code> and 
	       <code>install-packages</code> targets which in turn 
	       copy the binary modules and Tcl packages to their destination
	       directories. This commands create a functional Rivet environment with its
		   core language.
	    </para>
	  </step>
	</substeps>
      </step>
      <step>
	<title>Apache Configuration Files</title>
	<para>
	  Rivet is relatively easy to configure - we start off by
	  adding the module itself:
	</para>

	<programlisting>LoadModule rivet_module	<replaceable>/usr/lib/apache2/modules/mod_rivet.so</replaceable></programlisting>

	<para>
	  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:
	</para>

	<programlisting>AddType application/x-httpd-rivet .rvt
AddType application/x-rivet-tcl .tcl</programlisting>

	<para>
	  These tell Apache to process files with the
	  <filename>.rvt</filename> and <filename>.tcl</filename>
	  extensions as Rivet files.
	</para>
	<para>
	  The characters encoding can be changed using the <command>header type</command> command,
	  but you can also change the default charset for the whole site:
	</para>
	<programlisting>AddType 'application/x-httpd-rivet;charset=utf-8' rvt</programlisting>
	<para>
	   All the pages generated by Rivet on this site will be sent with a 
	    <command>Content-Type:'text/html;charset=utf-8'</command> header.
	</para>
	<para>You may also wish to use Rivet files as index files for
	directories.  In that case, you would do the following:</para>
	<programlisting>DirectoryIndex index.html index.htm index.shtml index.cgi index.tcl index.rvt</programlisting>
	<para>
	  For other directives that Rivet provides for Apache
	  configuration, please see <xref linkend="directives"/>.
	</para>
      </step>
    </procedure>
</section>