Updated instructions for using mod_survey on OpenBSD (including chrooted) (fwd)
Joel Palmius <[email protected]> Thu, 14 Sep 2006 10:22:19 +0200 (CEST)
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
---------- Forwarded message ---------- Date: Thu, 14 Sep 2006 16:30:05 +1000 From: Ross Richardson <[email protected]> To: [email protected] Subject: Updated instructions for using mod_survey on OpenBSD (including chrooted) Joel, I thought I should have a go at running mod_survey with OpenBSD's (default) chroot apache. It was pretty simple to get going and it seems to work, so I decided I should update my instructions for OpenBSD. Attached are the instructions and a patch file referenced in the instructions. Hope it helps! Cheers, rlr -- Ross L Richardson <URL:mailto:[email protected]> Senior Systems Administrator Phone : +61 (0)3 6226 6233 Information Technology Resources Fax : +61 (0)3 6226 7171 University of Tasmania, AUSTRALIA
msobsd.html
(text/html, 3.1 KB)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Installation on OpenBSD</title>
<body>
<h1>Instructions for Installation of Mod_Survey 3.2.x on <a href="http://www.openbsd.org/">OpenBSD</a></h1>
<p><strong>These instructions are generalised from (successful) experience with <a href="http://www.openbsd.org/">OpenBSD</a> 3.8.</strong> Please report any problems.</p>
<p>Firstly, the <a href="#nonchroot">installation</a> method for use with <a href="http://httpd.apache.org/">Apache httpd</a> without the default <code>chroot</code> environment (i.e. is invoked with the <kbd>-u</kbd> flag) is described. The <a href="chroot">additional steps</a> required for running in the <code>chroot</code> environment are then given.</p>
<p>No <a href="http://www.openbsd.org/ports.html">port</a> is available.</p>
<h2><a name="nonchroot">Installation for Use <em>Without</em> <code>chroot</code></a></h2>
<ol>
<li>Apply all system <a href="http://www.openbsd.org/errata.html">patches</a></li>
<li>Install the required ports/packages :<ul>
<li><kbd>mod_perl</kbd></li>
</ul></li>
<li><em>Optionally</em>, install port <kbd>p5-DBI</kbd> and its requirements (<kbd>p5-PlRPC</kbd> and <kbd>p5-Net-Daemon</kbd>)</li>
<li>Install <kbd>mod_survey</kbd> :
<pre>
# extract
: root; cd /var/www
: root; tar xzef <var>/path/to/</var>modsurvey-3.2.<var>x</var>.tgz
: root; cd mod_survey
: root; tar xzef <var>/path/to/</var>modsurvey-docs-3.2.<var>x</var>.tgz
: root; cd ..
# fix file permissions
: root; chmod -R 644 mod_survey
: root; find mod_survey \( -type d -or -name '*.pl' -or -name '*.pm' \) -exec chmod 755 {} \;
# create data directory
: root; mkdir mod_survey/data
: root; chmod 700 mod_survey/data
: root; chown www:www mod_survey/data
# create configuration file
: root; cd mod_survey
: root; cp -pi survey.conf.sample survey.conf
: root; patch -b < <var>/path/to/</var><a href="survey.conf.patch">survey.conf.patch</a>
: root; cd ..
</pre></li>
<li>Configure <a href="http://httpd.apache.org/">Apache httpd</a> to use <kbd>mod_survey</kbd> :
<pre>
: root; echo "Include /var/www/mod_survey/survey.conf" >> /var/www/conf/httpd.conf
</pre></li>
</ol>
<h2><a name="chroot">Additional Steps for Use in the <code>chroot</code></a> Environment</h2>
<ul>
<li>create required directories in <kbd>/var/www</kbd> :
<pre>
: root; cd /var/www
: root; mkdir -p usr/libdata usr/local/libdata var tmp
: root; chgrp -R wheel usr var tmp
: root; chmod go+w,o+t tmp
: root; cd var
: root; ln -s .. www
</pre></li>
<li>copy the files required by <kbd>mod_perl</kbd> :
<pre>
: root; cd /var/www
: root; cp -Rp /usr/libdata/perl5 usr/libdata
: root; cp -Rp /usr/local/libdata/perl5 usr/local/libdata
</pre></li>
</ul>
<hr>
<address><a href="mailto:[email protected]">Ross L Richardson</a>, <a href="http://www.utas.edu.au/itr/"><acronym>ITR</acronym></a>, <a href="http://www.utas.edu.au">University of Tasmania</a></address>
</body>
</html>
survey.conf.patch
(text/plain, 2.6 KB)
--- survey.conf.orig Fri Jun 30 22:06:17 2006
+++ survey.conf Mon Jul 3 15:02:16 2006
@@ -31,7 +31,7 @@
# -----------------------------------------
# Directory where caches, autodata files and keys should be stored
-PerlSetEnv _SURVEY_SYSBASE "/usr/local/mod_survey/data/"
+PerlSetEnv _SURVEY_SYSBASE "/var/www/mod_survey/data/"
# Whether parser is allowed to write and read cache at all (overrides
# ALLOWCACHE in survey docs if set to 0)
@@ -42,10 +42,10 @@
PerlSetEnv _SURVEY_DISPLAYCACHE 1
# Where mod_survey is installed
-PerlSetEnv _SURVEY_HOME "/usr/local/mod_survey/"
+PerlSetEnv _SURVEY_HOME "/var/www/mod_survey/"
# Where mod_survey web root is
-PerlSetEnv _SURVEY_ROOT "/usr/local/mod_survey/webroot/"
+PerlSetEnv _SURVEY_ROOT "/var/www/mod_survey/webroot/"
# Which root alias to use for doc links and similar
PerlSetEnv _SURVEY_ROOT_ALIAS "/mod_survey/"
@@ -60,7 +60,7 @@
# If you plan to use DBI tables, you must install DBI 1.13 or later and
# set the below to 1. Even if you have DBI installed, you may want to
# choose to not enable it in Mod_Survey for security reasons.
-PerlSetEnv _SURVEY_USEDBI 1
+PerlSetEnv _SURVEY_USEDBI 0
# Whether is is allowed to let system automatically handle data submission
# It would a stupid idea to change this unless you know what you are doing.
@@ -80,7 +80,7 @@
# -------------------------------------
# Where to find language files
-PerlSetEnv _SURVEY_LANG_DIRECTORY "/usr/local/mod_survey/Lang/"
+PerlSetEnv _SURVEY_LANG_DIRECTORY "/var/www/mod_survey/Lang/"
# Which language to use
PerlSetEnv _SURVEY_LANG "en"
@@ -89,7 +89,7 @@
# Startup check and addition of survey folder to @INC
# ---------------------------------------------------
-Perlrequire "/usr/local/mod_survey/startup.pl"
+Perlrequire "/var/www/mod_survey/startup.pl"
# --------------------------------------------------------------------
# Add type for survey files. If you change this, please change pattern
@@ -108,7 +108,7 @@
<Files *.survey*>
SetHandler perl-script
PerlHandler Survey::Handler
- PerlSendHeader "Off"
+ PerlSendHeader "On"
AuthType Basic
AuthName Mod_Survey
PerlAuthenHandler Apache::AuthAny
@@ -120,9 +120,9 @@
# scripts and similar
# ---------------------------------------------------------------
-Alias /mod_survey/ "/usr/local/mod_survey/webroot/"
+Alias /mod_survey/ "/var/www/mod_survey/webroot/"
-<Directory /usr/local/mod_survey/webroot/>
+<Directory /var/www/mod_survey/webroot/>
Options +All
AllowOverride All
Order allow,deny