<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<title>Install AOLserver 3.3+ad13</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.45">
<link rel="home" href="index.html" title="OpenACS Documentation">
<link rel="up" href="unix-install.html" title="Chapter 2. Installing on Unix/Linux">
<link rel="previous" href="postgres.html" title="Install PostgreSQL 7.1.3">
<link rel="next" href="openacs.html" title="Install OpenACS 4.5">
<link rel="stylesheet" href="openacs.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<a href="http://openacs.org"><img src="images/alex.jpg" border="0"></a><table width="100%" summary="Navigation header" border="0"><tr>
<td width="20%" align="left">
<a accesskey="p" href="postgres.html">Prev</a>&nbsp;</td>
<th width="60%" align="center">Chapter 2. Installing on Unix/Linux</th>
<td width="20%" align="right">&nbsp;<a accesskey="n" href="openacs.html">Next</a>
</td>
</tr></table>
<hr>
</div>
<div class="sect1">
<div class="titlepage"><div><h2 class="title" style="clear: both">
<a name="aolserver"></a>Install AOLserver 3.3+ad13</h2></div></div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-download"></a>Download the Distribution</h3></div></div>
<p>
	  Mat Kovach is graciously maintaining an AOLServer distribution that
	  includes all the patches and modules needed to run OpenACS 4.5. These
	  instructions will describe how to install using his source
	  distribution. He also has binaries for SuSE 7.3 and OpenBSD 2.8 (and
	  perhaps more to come), currently located at <a href="http://uptime.openacs.org/aolserver-openacs/" target="_top">uptime.openacs.org</a>.
	</p>
<p>
	  It's also possible to download all the pieces and patches yourself:
	</p>
<div class="itemizedlist"><ul>
<li><p>
		  AOLServer is available at <a href="http://aolserver.com" target="_top">aolserver.com</a> 
		</p></li>
<li><p> 
		  ArsDigita's AOLServer distribution (including
		  internationalization patches, nscache, nsrewrite, nssha1 and the
		  oracle driver) is available at <a href="http://www.arsdigita.com/acs-repository/download-verify?version_id=2081" target="_top">arsdigita.com</a>
		  </p></li>
<li><p>
		  The OpenACS PostgreSQL driver is available from <a href="http://openacs.org/software" target="_top">OpenACS</a>
		</p></li>
<li><p>
		  nsxml is available at <a href="http://acs-misc.sourceforge.net/dl/nsxml.tgz" target="_top">http://acs-misc.sourceforge.net</a>. 
		</p></li>
<li><p>
		  The patch that makes <tt>exec</tt> work
		  on BSD is available at <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=415475&amp;group_id=3152&amp;atid=303152" target="_top">sourceforge.net</a>
		</p></li>
<li><p>
		  The patch that makes <tt>ns_uuencode</tt>
		  work for binary files is available at <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=474259&amp;group_id=3152&amp;atid=303152" target="_top">sourceforge.net</a>
		</p></li>
<li><p>
		  The patch that makes AOLServer respect the
		  <tt>-g</tt> flag is available at <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=509413&amp;group_id=3152&amp;atid=303152" target="_top">sourceforge.net</a>
		</p></li>
</ul></div>
<p>

	  .... or just Download <a href="http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz" target="_top">Mat's
	  AOLServer distribution</a> to
	  <tt>/tmp</tt>

	</p>
<pre class="programlisting">
joeuser:~$ cd /tmp
joeuser:/tmp$ wget -c http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz
joeuser:/tmp$ cd</pre>
<p>

	  As <tt>root</tt>, untar
	  <tt>aolserver3.3ad13-oacs1-beta-src.tar.gz</tt>
	  into <tt>/usr/local/src</tt>

	</p>
<pre class="programlisting">
joeuser:~$ su -
Password: **********
root:~$ cd /usr/local/src
root:/usr/local/src# tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz</pre>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-user-accounts"></a>Create the nsadmin user</h3></div></div>
<p>
	  You will need a special user account for running AOLServer. This user
	  will be called <tt>nsadmin</tt> and belong
	  top the special group <tt>web</tt>. 
	  <tt>nsadmin</tt>'s home directory will
	  be <tt>/usr/local/aolserver</tt>.You must
	  execute these steps as <tt>root</tt>.
	</p>
<div class="itemizedlist"><ul><li>
<p>
		  Run these commands: 
		</p>
<pre class="programlisting">
root:/usr/local/src# cd
root:~# groupadd nsadmin
root:~# groupadd web
root:~# useradd -g nsadmin -G web -d /usr/local/aolserver nsadmin
root:~# passwd nsadmin
; Set password for nsadmin
       
root:~# mkdir -p /web /usr/local/aolserver
root:~# chown -R nsadmin.web /usr/local/aolserver /web /usr/local/src/aolserver
root:~# chmod 775 /usr/local/aolserver /web
root:~# exit</pre>
</li></ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-env"></a>Set up nsadmin's environment variables</h3></div></div>
<div class="itemizedlist"><ul><li>
<p> At this point, you should customize the
		  <tt>nsadmin</tt> login scripts. Login as
		  <tt>nsadmin</tt> and add the following
		  lines to your
		  <tt>/usr/local/aolserver/.bash_profile</tt>:
		</p>
<pre class="programlisting">
joeuser:~$ su - nsadmin
Password: ***********
nsadmin:~$ emacs .bash_profile</pre>
<p>
		  Add the first set of lines, if you're using Oracle. The 2nd set
		  of lines, if you're using PostgreSQL.  <span class="emphasis"><i>Oracle
		  Note:</i></span> These environment variables are specific for a
		  local Oracle installation communicating via IPC. If you are
		  connecting to a remote Oracle installation, you'll need to adjust
		  these appropriately. Also, make sure that the '8.1.7' matches
		  your Oracle version.
		</p>
<pre class="programlisting">
# For Oracle
export ORACLE_BASE=/ora8/m01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=ora8
export ORACLE_TERM=vt100
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
   
# For PostgreSQL
export PATH=$PATH:/usr/local/pgsql/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib</pre>
<p>
		  Be absolutely certain that you have entered these lines correctly
		  and that you have saved the file - a slight error in these lines
		  can lead to many inscrutable error messages. Logout and log back
		  in so these settings will take effect. Use the
		  <tt>echo</tt> command to be sure that the
		  environment variables have been properly assigned.
		</p>
<pre class="programlisting">
nsadmin:~$ exit
joeuser:~$ su - nsadmin
Password: *********
nsadmin:~$ echo $PATH
...some other directory paths...:/usr/local/pgsql/bin
nsadmin:~$ echo $LD_LIBRARY_PATH
:/usr/local/pgsql/lib</pre>
<p>
		  Note: The result should be different if you're using Oracle. 
		  <tt>/ora8/m01/app/oracle/product/8.1.7</tt>
		  should have been in <tt>$PATH</tt>.
		</p>
</li></ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-libxml2"></a>Install libxml2 &amp; headers</h3></div></div>
<p>

	  In order for nsxml to compile, you need libxml2
	  (available from <a href="http://xmlsoft.org" target="_top">http://xmlsoft.org</a>). On Debian,
	  this can be installed by doing <tt>apt-get install
		libxml2-dev</tt>. Users of other distributions can
	  download rpms from <a href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/" target="_top">ftp.gnome.org</a>. You'll
	  need the <tt>libxml2</tt> and
	  <tt>libxml2-devel</tt> packages.
	</p>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-compile"></a>Compile and install AOLserver</h3></div></div>
<div class="itemizedlist"><ul>
<li>
<p>Prepare the distribution</p>
<pre class="programlisting">
nsadmin:~$ cd /usr/local/src/aolserver
nsadmin:/usr/local/src/aolserver$ ./conf-clean
cat: BUILD-MODULES: No such file or directory
Done.</pre>
</li>
<li>
<p>

		  Put the name of the driver(s) that you want into
		  <tt>conf-db</tt>. This can be
		  <tt>&quot;postgresql&quot;</tt>,
		  <tt>&quot;oracle&quot;</tt>, or the word
		  <tt>&quot;both&quot;</tt> if you want both drivers
		  installed.
		</p>
<pre class="programlisting">
nsadmin:/usr/local/src/aolserver$ echo &quot;postgresql&quot; &gt; conf-db</pre>
</li>
<li><p>

		  <tt>conf-inst</tt> should contain the
		  location where AOLserver is to be installed. This defaults to
		  <tt>/usr/local/aolserver</tt>, so we
		  don't need to change it.

		</p></li>
<li>
<p>

		  <tt>conf-make</tt> should contain the
		  name of the GNU Make command on your system. It defaults to
		  <tt>gmake</tt>. You may need to change
		  this to <tt>make</tt>.
		</p>
<pre class="programlisting">
nsadmin:/usr/local/src/aolserver$ echo &quot;make&quot; &gt; conf-make</pre>
</li>
<li>
<p>
		  If you're going to be installing the Postgresql driver, you'll
		  have to adjust the makefile first. This will hopefully be cleaned
		  up in future versions of this distribution.
		</p>
<pre class="programlisting">
nsadmin:/usr/local/src/aolserver$ emacs pgdriver/makefile</pre>
<p>
		  Edit the lines containing PGLIB and PGINC so they look like this:
		</p>
<pre class="programlisting">
PGINC=/usr/local/pgsql/include

PGLIB=/usr/local/pgsql/lib</pre>
</li>
<li>
<p>Compile and install AOLserver and modules</p>
<pre class="programlisting">
nsadmin:/usr/local/src/aolserver$ ./conf</pre>
<p>
		  This takes about 5 minutes. All of the results are logged to
		  files in
		  <tt>/usr/local/src/aolserver/log</tt>. Make
		  sure to check these files to see if any errors occurred.
		</p>
</li>
</ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-test"></a>Test AOLserver</h3></div></div>
<div class="itemizedlist"><ul>
<li>
<p> 
		  You will now test to ensure AOLserver is running correctly. We'll
		  use the sample config file provided with AOLserver. This file
		  will attempt to guess your IP address and hostname. It will then
		  set up the server at port 8000 of that IP address. 
		</p>
<pre class="programlisting">
nsadmin:/usr/local/src/aolserver$ cd
nsadmin:~$ ./bin/nsd -t sample-config.tcl</pre>
<p>
		  As the AOLserver daemon starts up, you should see a few normal
		  warnings (listed below), which are safe to ignore. 
		</p>
<pre class="programlisting">
Warning: nsd.tcl: nsssl not loaded -- key/cert files do not exist.
Warning: nsd.tcl: nscp not loaded -- user/password is not set.</pre>
<p>		  
		  The first warning means that the server is missing files for
		  running <tt>ssl</tt>, a necessary module
		  for encrypted HTTPS. See Scott Goodwin's <a href="http://scottg.net/webtools/opennsd/modules/nsopenssl/" target="_top">excellent
		  documentation</a> if you want to set up SSL. The second
		  warning means that the AOLserver control panel, a special module
		  for administering AOLserver, could not be loaded. If you're
		  interested in configuring nscp, please see the <a href="http://www.aolserver.com/docs" target="_top">AOLserver
		  documentation</a>.
		</p>
</li>
<li>
<p>
		  Test to see if AOLserver is working by starting
		  <tt>Mozilla</tt> or
		  <tt>Lynx</tt>, and surfing over to your
		  web page: 
		</p>
<pre class="programlisting">
nsadmin:~$ lynx localhost:8000</pre>
<p>
		  You should see a &quot;Welcome to AOLserver&quot; page. If this
		  doesn't work, try going to
		  <tt>http://127.0.0.1:8000/</tt>. If this
		  still doesn't work, check out the <a href="aolserver.html#install-aolserver-troubleshooting">Troubleshooting AOLServer</a> section below.
		  </p>
</li>
<li>
<p>
		  Shutdown the test server: </p>
<pre class="programlisting">
nsadmin:~$ killall nsd</pre>
<p>
		  The <tt>killall</tt> command will kill
		  all processes with the name <tt>nsd</tt>,
		  but clearly this is not a good tool to use for managing your
		  services in general. We cover this topic in the <a href="openacs.html#install-openacs-keepalive">Keep AOLServer alive</a> section.
		</p>
</li>
</ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><h3 class="title">
<a name="install-aolserver-troubleshooting"></a>Troubleshooting the AOLserver Install</h3></div></div>
<p>If you can't view the welcome page, it's likely
	  there's a problem with your server configuration. Start by
	  viewing your AOLserver log, which is in
	  <tt>/usr/local/aolserver/log/server.log</tt>.
	  You should also try to find lines of the form:</p>
<pre class="programlisting">
[01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: nssock: listening on http://localhost.localdomain:8000 (127.0.0.1:8000)
[01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: accepting connections</pre>
<p>If you can find these lines, try entering the URL the server is
	  listening on. If you cannot find these lines, there must be an error
	  somewhere in the file. Search for lines beginning with the word
	  <tt>Error</tt> instead of
	  <tt>Notice</tt>.</p>
<p>The <tt>sample-config.tcl</tt> file grabs
	  your address and hostname from your OS settings. </p>
<pre class="programlisting">
set hostname        [ns_info hostname]
set address         [ns_info address]</pre>
<p>If you get an error that nssock can't get the requested address,
	  you can set these manually:</p>
<pre class="programlisting">
#set hostname        [ns_info hostname]
set hostname 127.0.0.1
#set address         [ns_info address]
set address 127.0.0.1</pre>
<p>
	  If you get an error that nssock can't assign the requested port,
	  then that port may already be taken by another service. Try specifying
	  a different port in the config file.
	</p>
</div>
<p><div class="cvstag">($Id: aolserver.html,v 1.1 2002/07/09 17:34:57 rmello Exp $)</div></p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="postgres.html">Prev</a>&nbsp;</td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right">&nbsp;<a accesskey="n" href="openacs.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left">Install PostgreSQL 7.1.3&nbsp;</td>
<td width="20%" align="center"><a accesskey="u" href="unix-install.html">Up</a></td>
<td width="40%" align="right">&nbsp;Install OpenACS 4.5</td>
</tr>
</table>
<hr>
<address>
			rmello at fslc.usu.edu
		</address>
<address><a href="mailto:vinod@kurup.com">
			vinod@kurup.com
		  </a></address>
</div>
</body>
</html>