[LON-CAPA-cvs] cvs: doc /build config.frag generate_web_pages.pl install.html loncapapasswords.html manual_install.frag reconfig.html rh73.frag rh73.html shell.html upgrade.frag upgrade.html verify.html

bowersj2 lon-capa-cvs@mail.lon-capa.org
Tue, 19 Aug 2003 13:53:44 -0000


This is a MIME encoded message

--bowersj21061301224
Content-Type: text/plain

bowersj2		Tue Aug 19 09:53:44 2003 EDT

  Added files:                 
    /doc/build	config.frag generate_web_pages.pl manual_install.frag 
              	rh73.frag upgrade.frag 

  Removed files:               
    /doc/build	install.html loncapapasswords.html reconfig.html 
              	rh73.html upgrade.html verify.html 

  Modified files:              
    /doc/build	shell.html 
  Log:
  Moving to update install site.
  
  
--bowersj21061301224
Content-Type: text/plain
Content-Disposition: attachment; filename="bowersj2-20030819095344.txt"

Index: doc/build/shell.html
diff -u doc/build/shell.html:1.1 doc/build/shell.html:1.2
--- doc/build/shell.html:1.1	Tue Jul 29 14:43:04 2003
+++ doc/build/shell.html	Tue Aug 19 09:53:44 2003
@@ -1 +1 @@
-<HTML><HEAD><title><!-- title --></title></HEAD><BODY BGCOLOR="#FFFFFF" LINK="#003333" ALINK="#339966" VLINK="#229944" onload=""><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4 WIDTH="100%">  <TR>     <TD ROWSPAN=5 VALIGN=top> <P><IMG SRC="http://www.loncapa.org/images/edgegraphic.jpg" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P></TD>    <TD COLSPAN=3 VALIGN=top bgcolor="#CC6633"><img src="http://www.loncapa.org/images/student.jpg" width="600" height="85">     </TD>  </TR>  <TR>    <TD width=8 bgcolor="#CC6633"> <P>&nbsp;</P></TD>    <TD colspan=2 bgcolor="#FFFF99"> <P>      <A HREF="index.html">Home</A> &gt; <!-- breadcrumb --> </P>      <h1><font color="#006600"><!-- title --></font></h1>      <!-- content -->      </TD>  </TR>  <TR>     <td colspan=3 bgcolor="CC6633"><P>&nbsp;</P></td>  </tr>  <tr>     <td width=8><p>&nbsp;</p></td><td><P>Contact Us: <A HREF="mailto:korte@lon-capa.org">lon-capa@lon-capa.org</A></P>      </td>    <td rowspan=2 width=170><P><A HREF="http://www.lite.msu.edu"><IMG SRC="http://www.loncapa.org/images/LITElogo_text.gif" ALT="Laboratory for Instructional Technology in Education" WIDTH=78 HEIGHT=97 BORDER=0 ALIGN=bottom></A><A HREF="http://www.lite.msu.edu/"><IMG SRC="http://www.loncapa.org/images/liteani.gif" WIDTH=85 HEIGHT=97 BORDER=0 ALIGN=bottom></A></P></TD>  </TR>  <tr><td width=8><p>&nbsp;</p></td>    <td> <a href="http://www.itr.nsf.gov/"><img src="http://www.loncapa.org/images/NSF_logo.gif" width="116" height="56" alt="Funded by the National Science Foundation Information Technology Research" border="0"></a>       <a href="http://www.msu.edu/"><img src="http://www.loncapa.org/images/MSULOGO.gif" width="154" height="38" alt="Michigan State University" border="0"></a>     </TD>  </tr></TABLE></BODY></HTML>
\ No newline at end of file
+<HTML><HEAD><title><!-- title --></title></HEAD><BODY BGCOLOR="#FFFFFF" LINK="#003333" ALINK="#339966" VLINK="#229944" onload=""><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4 WIDTH="100%">  <TR>     <TD ROWSPAN=5 VALIGN=top> <P><IMG SRC="http://www.loncapa.org/images/edgegraphic.jpg" X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P></TD>    <TD COLSPAN=3 VALIGN=top bgcolor="#CC6633"><img src="http://www.loncapa.org/images/student.jpg" width="600" height="85">     </TD>  </TR>  <TR>    <TD width=8 bgcolor="#CC6633"> <P>&nbsp;</P></TD>    <TD colspan=2 bgcolor="#FFFF99"> <P>      <A HREF="http://www.lon-capa.org/index.html">Home</A> &gt; <!-- breadcrumb --> </P>      <h1><font color="#006600"><!-- title --></font></h1>      <!-- content -->      </TD>  </TR>  <TR>     <td colspan=3 bgcolor="CC6633"><P>&nbsp;</P></td>  </tr>  <tr>     <td width=8><p>&nbsp;</p></td><td><P>Contact Us: <A HREF="mailto:korte@lon-capa.org">lon-capa@lon-capa.org</A></P>      </td>    <td rowspan=2 width=170><P><A HREF="http://www.lite.msu.edu"><IMG SRC="http://www.loncapa.org/images/LITElogo_text.gif" ALT="Laboratory for Instructional Technology in Education" WIDTH=78 HEIGHT=97 BORDER=0 ALIGN=bottom></A><A HREF="http://www.lite.msu.edu/"><IMG SRC="http://www.loncapa.org/images/liteani.gif" WIDTH=85 HEIGHT=97 BORDER=0 ALIGN=bottom></A></P></TD>  </TR>  <tr><td width=8><p>&nbsp;</p></td>    <td> <a href="http://www.itr.nsf.gov/"><img src="http://www.loncapa.org/images/NSF_logo.gif" width="116" height="56" alt="Funded by the National Science Foundation Information Technology Research" border="0"></a>       <a href="http://www.msu.edu/"><img src="http://www.loncapa.org/images/MSULOGO.gif" width="154" height="38" alt="Michigan State University" border="0"></a>     </TD>  </tr></TABLE></BODY></HTML>
\ No newline at end of file

Index: doc/build/config.frag
+++ doc/build/config.frag
<p>
There are about a dozen files on the LON-CAPA server systems
which the system administrator may need to adjust.
</p>
<p>
The two most important configuration files are:
</p>
<ul>
<li><strong>loncapa.conf</strong> -
typically located in the directory <tt>/etc/httpd/conf/</tt>;
<br /><i>contains machine-specific and institution-specific
variables and modifications necessary for
the effective running of the Apache web server;
note that there is also a <strong>loncapa_apache.conf</strong>
which should be installed, but not modified</i>
<br />&nbsp;
</li>
<li><strong>hosts.tab</strong> -
typically located in the directory <tt>/home/httpd/lonTabs/</tt>;
<br /><i>is a listing of all other internet machines that a server
system considers to be valid server systems on the LON-CAPA
network</i>
<br />&nbsp;
</li>
</ul>
<!-- preamble end -->
<!-- maintext start -->
<h3>Current Reconfiguration Procedure</h3>
<p>
After making any configuration change, you will need to restart system
services.  The two most important system services on a LON-CAPA system are
<strong>loncapa</strong> and <strong>httpd</strong>.  Here are the
commands for restarting the system services:
</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<tt>/etc/rc.d/init.d/loncapa restart</tt>
<br /><tt>/etc/rc.d/init.d/httpd restart</tt>
</td></tr></table>
<p>
We recommend that a knowledgeable system administrator should
perform any adjustments on a LON-CAPA server machine.
Locations of these files are by default.  Depending on your
Linux distribution--RedHat, Mandrake, Debian, etc, the file paths
may be elsewhere.
</p>
<h3>Configuration files that will have to be altered</h3>
<p>
LON-CAPA currently depends on the following list of configuration
files.  Note that <tt>loncapa.conf</tt> is automatically
altered by the installation/upgrade scripts associated with
the tarball-distribution (see the <b>INSTALL</b> and <b>UPGRADE</b>
sections of this web-site).  (Thus, the system administrator should
not have to further adjust <tt>loncapa.conf</tt> from the terminal.)
</p>
<ul>
<li><a href="confexamples/loncapa.conf">[EXAMPLE]</a>
/etc/httpd/conf/loncapa.conf</li>
<li><a href="confexamples/hosts.tab">[EXAMPLE]</a>
/home/httpd/lonTabs/hosts.tab</li>
<li><a href="confexamples/spare.tab">[EXAMPLE]</a>
/home/httpd/lonTabs/spare.tab</li>
<li><a href="confexamples/krb.conf">[EXAMPLE]</a> /etc/krb.conf</li>
<li><a href="confexamples/htpasswd">[EXAMPLE]</a>
/home/httpd/lonTabs/htpasswd</li>
<li><a href="confexamples/ntp.conf">[EXAMPLE]</a> /etc/ntp.conf</li>
<li><a href="confexamples/step-tickers">[EXAMPLE]</a>
/etc/ntp/step-tickers</li>
<li><a href="confexamples/pwauth">[EXAMPLE]</a> /etc/pam.d/pwauth</li>
</ul>
<h3>Configuration files that do not have to be altered</h3>
<p>
The following configuration files are critical for the correct
performance of a LON-CAPA server machine.  Typically, these configuration
files do not need to be adjusted by the system administrator.
</p>
<ul>
<li><a href="confexamples/loncapa_apache.conf">[EXAMPLE]</a>
/etc/httpd/conf/loncapa_apache.conf</li>
<li><a href="confexamples/un_keyword.tab">[EXAMPLE]</a>
/home/httpd/html/res/adm/includes/un_keyword.tab</li>
</ul>

<h3>Configuring Secondary Services</h3>
<p>
LON-CAPA does not provide integrated support for secondary services.
The expectation is that knowledgeable system administrators will
customize these secondary services for their institution.
</p>
<p>
We do, however, provide example configurations of services that you
may want to deliver with LON-CAPA (i.e. Samba and AppleChooser).
</p>
<ul>
<li><a href="confexamples/smb.conf">[EXAMPLE]</a> /etc/smb.conf</li>
<li><a href="confexamples/config">[EXAMPLE]</a> /etc/atalk/config</li>
</ul>

Index: doc/build/generate_web_pages.pl
+++ doc/build/generate_web_pages.pl
#!/usr/bin/perl -w

=pod

=NAME

generate_web_pages.pl - generate the web pages for the install site

=SYNOPSIS

Yeah, it does that.

Basically, there's a few comments in shell.html that we replace with
    what we really want in the files. Pretty simple.

The point of this is to look like the main site.

=cut

# This is the list of pages to generate: Change this to
# add/subtract/etc. pages. Index is done seperately.
# Title, source

my @pages = ( 
	      ['Red Hat 7.3 Install', 'rh73'],
	      ['Manual Install from Tarballs', 'manual_install'],
	      ['Upgrading from Previous LON-CAPA install', 'upgrade'],
	      ['Post-installation Configuration', 'config'],
	      ['LON-CAPA License (Gnu Public License)', 'license']
	      );

open SHELL, '<', "shell.html";
my $shell = join '', <SHELL>;
$shell =~ s/\r/\n/g;

# Call with: The title, breadcrumb, and content
sub replaceText {
    my ($title, $breadcrumb, $content) = @_;

    my $page = $shell;
    $page =~ s/\<!-- *title *--\>/$title/g;
    $page =~ s/\<!-- *breadcrumb *--\>/$breadcrumb/g;
    $page =~ s/\<!-- *content *--\>/$content/g;

    return $page;
}

# Do the index page

open INDEX, '>', "index.html";
my $content = <<PRELUDE;
<p>LON-CAPA is based upon a lot of Open Source modules, so it's important
to have the right environment on your computer. Since it will frequently 
be the case that LON-CAPA will be going onto a dedicated machine, we've 
included instructions for installing LON-CAPA concurrently with new
installations of some of the popular Linux distributions.</p>

<p>A tarball installation is also available for those who wish to 
install on other distributions. Currently, Apache 1.x is required;
LON-CAPA does not yet run on 2.0.</p>

<p>For all distributions, please see how to 
<a href="config.html">configure the server after installation</a>.</p>
PRELUDE

$content .= "<ul>\n";
for (@pages) {
    $content .= "<li><a href='$_->[1].html'>$_->[0]</a></li>\n";
}

$content .= "</ul>\n";
$content .= <<POSTLUDE;
This is a postlude.
POSTLUDE

my $index = replaceText("Install LON-CAPA", "Install LON-CAPA",
    $content);
print INDEX $index;
close INDEX;

# Build the pages
for (@pages) {
    my ($title, $source) = @$_;

    # read in content
    open SOURCE, '<', $source.'.frag';
    $content = join '', <SOURCE>;
    close SOURCE;

    $content = replaceText($title, '<a href="/">Install LON-CAPA</a> &gt; ' . $title,
			   $content);
    open DEST, '>', $source.'.html';
    print DEST $content;
    close DEST;
}

Index: doc/build/manual_install.frag
+++ doc/build/manual_install.frag
<p>
You will need to check all the following things to ensure proper
installation of your LON-CAPA system.
</p>
<ul>
<li><a href="#wwwuser">
Creating a user 'www'</a></li>
<li><a href="#shadow">
Make a LON-CAPA system work with shadow passwords</a></li>
<li><a href="#install">
Installing LON-CAPA files</a></li>
<li><a href="#checkrpms">
Checking your Linux RPMs</a> (On RedHat)</li>
<li><a href="#fixhosts">
Fixing <tt>/etc/hosts</tt></a></li>
<li><a href="#mysql">
Configuring the MySQL database</a></li>
<li><a href="#testing">
Testing to see if the LON-CAPA server is operational</a></li>
</ul>

<a name="wwwuser" />
<h3>Creating a user 'www'</h3>
<p>
Execute the following command to create a user named 'www' on your
LON-CAPA server:
</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<tt>/usr/sbin/useradd www</tt>
</td></tr></table>
<a name="shadow" />
<h3>Make a LON-CAPA system work with shadow passwords</h3>
<table border="1">
<tr><th>Step #</th><th>Description</th></tr>
<tr><td>
<font size="+1">1</font>
</td><td>
<p>Is your system using shadow passwords? (Note: LON-CAPA will work
with either MD5/non-MD5 configured systems).  It is strongly
recommended to use shadow passwords. If your system is currently not
using shadow passwords, run the "pwconv" command (as root) in order to
convert to shadow passwords.  If you choose not to use shadow
passwords, then do not perform any of the additional steps.  If your
system is using shadow passwords, then you will need to perform the
additional steps below. 
</p>
<p>
<strong>How to detect:</strong>
<br />command: <tt>cat /etc/passwd | grep ':x:'</tt>
</p>
<p>If there is output such as "<tt>root:x:0:0:root:/root:/bin/bash</tt>",
then your system is using shadow passwords and you will need to continue with
the steps below.
</p>
</td></tr>
<tr><td>
<font size='+1'>2</font>
</td><td>
<p><strong>Retrieve the mod_auth_external source</strong> by
running the following command
</p>
<p><tt>
wget http://www.unixpapa.com/software/mod_auth_external-2.1.15.tar.gz
</tt>
</p>
</td></tr>
<tr><td>
<font size='+1'>3</font>
</td><td>
<p><strong>Unpack the mod_auth_external source</strong> by
running the following command
</p>
<p>
<tt>tar xzvf mod_auth_external-2.1.15.tar.gz</tt>
</p>
</td></tr>
<tr><td>
<font size='+1'>4</font>
</td><td>
<p><strong>Go to the <tt>pwauth</tt> directory</strong> by
running the following command
</p>
<p>
<tt>cd mod_auth_external-2.1.15/pwauth/</tt>
</p>
</td></tr>
<tr><td>
<font size='+1'>5</font>
</td><td>
<p><strong>Edit <tt>config.h</tt> and change SERVER_UIDS definition</strong>
</p>
<p>
Determine the user id of 'www':
<br /><tt>id -u www</tt>
<br />
Change the line
<br /><tt>#define SERVER_UIDS 99       /* user "nobody" */</tt>
<br />to be
<br /><tt>#define SERVER_UIDS 513      /* user "www" */</tt>
<br />where in this example 513 corresponds to the user id of 'www'.
</p>
</td></tr>
<tr><td>
<font size='+1'>6</font>
</td><td>
<p><strong>Compile the <tt>pwauth</tt> executable</strong> by
running the following command
</p>
<p>
<tt>make</tt>
</p>
</td></tr>
<tr><td>
<font size='+1'>7</font>
</td><td>
<p><strong>Install <tt>pwauth</tt></strong> by doing the following
</p>
<p>
<tt>cp pwauth /usr/local/sbin/</tt>
<br /><tt>chmod 6755 /usr/local/sbin/pwauth</tt>
</p>
<p>
Edit (creating the file) /etc/pam.d/pwauth to have the contents:
</p>
<pre>
        auth       required     /lib/security/pam_pwdb.so shadow nullok
        auth       required     /lib/security/pam_nologin.so
        account    required     /lib/security/pam_pwdb.so
</pre>
</td></tr>
</table>
<a name="install" />
<h3>Installing LON-CAPA files</h3>
<p>
Download the most current
<a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz">
loncapa-current.tar.gz</a>.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>wget http://install.lon-capa.org/versions/loncapa-current.tar.gz
</tt>
<br />
<tt>tar xzvf loncapa-current.tar.gz</tt>
<br />
<tt>cd loncapa-N.N</tt> (N.N is the version number)</td></tr>
</table>
<p>
The <strong>UPDATE</strong> command will refresh your filesystem with all
the latest LON-CAPA software.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./UPDATE</tt></td></tr>
</table>
<a name="checkrpms" />
<h3>Checking your Linux RPMs on RedHat</h3>
<p>
The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
against an FTP repository, if you're using a RedHat server.
</p>

<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./CHECKRPMS</tt></td></tr>
</table>

<p>If you are not installing on RedHat, you may need to manually
install some software. The following pointers may be useful:</p>

<ul><li>LON-CAPA uses a lot of Perl modules. The easiest way to figure
out what Perl modules are being used by LON-CAPA that you do not have
installed is to try to start up LON-CAPA and see what Perl complains
about missing. Start by trying to run <tt>/home/httpd/perl/lonc</tt>
and <tt>/home/httpd/perl/lond</tt> manually as the <tt>www</tt> user,
and install the modules it complains about not finding. How you
install those modules will be distribution-specific, but failing all
else, you can use CPAN; see <tt>man CPAN</tt> on your distribution.<br
/><br />Once you've gotten <tt>lonc</tt> and <tt>lond</tt> to run, try
starting up the webserver. How long this will take depends entirely on
how close your distribution came to having all the modules LON-CAPA
uses when you started.</li>
<li>LON-CAPA assumes that the apache web server will be named "httpd"
and have configuration directories in <tt>/etc/httpd</tt>. Some distributions 
have that directory at <tt>/etc/apache</tt>. Symlinking <tt>httpd</tt> to the correct 
directory should work.</li>
</ul>
<a name="fixhosts" />
<h3>Fixing <tt>/etc/hosts</tt></h3>
<p>
A common RedHat glitch of new installations (RedHat's fault, not LON-CAPA)
is the generation of /etc/hosts.
</p>
<p>
It should look something like this (except the <tt>myschool</tt> line
should be replaced with settings specific to your machine):
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td>
<pre>
127.0.0.1		localhost.localdomain localhost
12.34.56.78		www.myschool.edu myschool
</pre></td></tr>
</table>
<a name="mysql" />
<h3>Configuring the MySQL database</h3>
<p>
The following commands describe how to configure the MySQL database
on your LON-CAPA server.
<br />Note:
</p>
<ul>
<li>you should substitute 'ROOTPASSWORD' with something very hard to guess
(it does not have to be the Linux OS root password)
</li>
<li>The MySQL www@localhost user must always have a password of 'localhostkey'
in order for there to be correct operation of a standard LON-CAPA system.
</li>
</ul>
<p>
The following instructions assume you are logged in as 'root'.
</p>
<p>Entering the mysql shell</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<pre>
mysql -u root -p mysql
OR
mysql -u root mysql (depending on whether you have set a root password)
</pre>
</td></tr></table>
<p>Creating the mysql 'www' user (after entering mysql shell)</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<pre>
mysql> CREATE DATABASE loncapa;

mysql> INSERT INTO user (Host, User, Password)
mysql> VALUES ('localhost','www',password('localhostkey'));

mysql> INSERT INTO db VALUES ('localhost','loncapa','www',
mysql> 'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');

mysql> FLUSH PRIVILEGES;
</pre>
</td></tr></table>
<p>SECURITY: set a password for the mysql 'root' user</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<pre>
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
</pre>
</td></tr></table>
<p>SECURITY: only allow access from localhost</p>
<table bgcolor="#aaaaaa" border="1"><tr><td>
<pre>
shell> mysql -u root -p mysql
mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
</pre>
</td></tr></table>
<a name="testing" />
<h3>Testing to see if the LON-CAPA server is operational</h3>
<p>
The <strong>TEST</strong> command will check the installation software,
the perl libraries on your system, the MySQL database, and
will also automatically test the real-time operation of the 
LON-CAPA Apache web server.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./TEST</tt></td></tr>
</table>
<p>
Using the <strong>TEST</strong> command will likely
be an iterative process.
It is normal to expect that the <strong>TEST</strong> command
will recommend you perform various steps to ensure optimal
performance of your LON-CAPA server.
</p>
<!-- maintext end -->
<!-- validated -->
</body>
</html>

Index: doc/build/rh73.frag
+++ doc/build/rh73.frag
<h1>Setting up a Red Hat 7.3 LON-CAPA Server</h1>
<h2>Integrated installation</h2>
<p>
These instructions combine the installation of RedHat 7.3 and LON-CAPA
into one straightforward process. 
More information is available at <a href="http://install.lon-capa.org/">
http://install.lon-capa.org/</a>.
</p>

<h2>Before you begin</h2>
<p>
Installing Linux is getting easier and easier.  However, it is still a
non-trivial undertaking and experience with Red Hat Linux will make this 
process easier.  You will be required to log in to the machine and execute
some routine Unix commands.  Some familiarity with Linux is assumed.
</p>

<h2>Installation Overview</h2>
<p>
The installation process takes the following steps:
</p>
<ol>
  <li> Obtain Red Hat 7.3 </li>
  <li> Gather information for installing Red Hat </li>
  <li> Install Red Hat 7.3 </li>
  <li> Determine your LON-CAPA Settings </li>
  <li> Install LON-CAPA </li>
  <li> Configure LON-CAPA </li>
  <li> Pick a hosts.tab file </li>
  <li> Create a Domain Coordinator </li>
  <li> Start/Restart services </li>
  <li> Log in to LON-CAPA </li>
</ol>

<h2>Obtain the Red Hat 7.3 installation CDs</h2>
<p>
These are freely available on the internet.
</p>

<h2>Determine Network settings for your site</h2>
<p>
You will need to have the following information for your site.  You must
have a static IP address (do not use DHCP).
</p>
<ul>
  <li>ip address </li>
  <li>netmask </li>
  <li>network </li>
  <li>broadcast </li>
  <li>hostname </li>
  <li>gateway </li>
  <li>domain name server(s) </li>
</ul>

<h2>Install Red Hat 7.3</h2>
<p>
When you install RedHat you will need to ensure the following (the list below
is in the order the issues appear in the installation of Red Hat 7.3):
</p>
<dl>
   <dt>Installation Type</dt>
   <dd>You should definitely do a "Server" install.  We do not recommend
       Trying to install LON-CAPA with a different installation type.</dd>
   <dt>Partitioning your Drive</dt>
   <dd>You may want to use the automatic partitioning feature of Red Hat,
       however you should review the results and be prepared to modify them.
       LON-CAPA resource files are stored in the /home directory, so the
       lion's share of the drive should be allocated here.  If you have 8 GB 
       of space for Red Hat, /home should receive 4 to 6 gigs.  Be sure to 
       include adequate swap space.  A minimum is 512 Megs, but you should
       typically have 1 or 2x as much swap space as you do physical RAM.</dd>
   <dt>Network Configuration</dt>
   <dd>LON-CAPA will <b>not</b> work with a machine set up to use a dynamic 
       IP address.  When configuring your network card, be sure to unselect
       the DHCP option and enter in your network information.</dd>
   <dt>Firewall Configuration</dt>
   <dd>The installation script will remove and disable your firewall.</dd>
   <dt>Package Group Selection</dt>
   <dd>At a minimum, install the following packages:
      <ul>
        <li>NFS File Server </li>
        <li>Windows File Server </li>
        <li>Web Server </li>
      </ul>
       Other packages can be installed as you like.</dd>
   <dt>X Windows Configuration</dt>
   <dd>If you chose to install the X-windows packages you will need to 
       configure them.  If you are unsure of the support for your video
       card you may wish to skip the configuration.</dd>
</dl>
<p>
Other notes:
</p>
<ul>
  <li>Use md5 and shadow passwords if you are given the choice (this is
      the default). </li>
</ul>

<h2>Determine LON-CAPA settings</h2>
<p>
LON-CAPA requires a number of identifying parameters be set in order
for it to function at all.  Below is a list with descriptions.
</p>
<dl>
  <dt>Host Type (library or access)</dt>
  <dd>The server must be designated a 'library' or an 'access' server.  In
      general you should have a library server for your instructors to create
      their course content on and run their courses.  Students should connect
      to access servers.  If you are doing the first install of LON-CAPA at 
      your site, or if you are playing with it for your own edification, you
      should make your machine a 'library' server.</dd>
  <dt>LON-CAPA domain</dt>
  <dd>Each site or school which installs LON-CAPA needs its own domain.
      Here at MSU we use 'msu'.  You should choose something short but
      meaningful.
   <i>Restriction: One word, no hyphens, underscores, or special characters</i>
  </dd>
  <dt>LON-CAPA host id</dt>
  <dd>Each LON-CAPA server requires a unique internal name.  We use names
      such as "msul1" for the first library server. 
   <i>Restriction: One word, no hyphens, underscores, or special characters</i>
  </dd>
  <dt>Host administrator email</dt>
  <dd>The amount of email sent to this address is relatively minimal.  Messages
      are sent every time the system starts up, or if the system is in 
      serious trouble. On a laptop, make this <tt>root@localhost</tt>.
  </dd>
  <dt>Root password for SQL database</dt>
  <dd>In order to keep people from corrupting the MYSQL database, a root
      password is needed.  You'll need to remember this.</dd>
</dl>

<h2>Install LON-CAPA</h2>
<p>
Log in as root with the password you provided during the Red Hat 
installation process.
</p><p>
Stop the http daemon while we're installing LON-CAPA. (If you're on a
fresh install, it is probably not running.)
<pre>
/etc/init.d/httpd stop
</pre>
</p><p>
Retrieve the LON-CAPA installation package
<pre>
wget http://install.loncapa.org/versions/rh73install/loncapa-rh73install.tar
tar xf loncapa-rh73install.tar
cd install
./install.pl
</pre>
</p>

<h2>Configure LON-CAPA</h2>
<p>
Execute the following commands
</p>
<pre>
cd /root/loncapa-N.N     (N.N should correspond to a version number like '0.6')
./UPDATE
</pre>
<p>
You will need to enter the LON-CAPA configuration information you requested
above.
</p>

<h2>Update your system</h2>
<p>
It is very important that you update your LON-CAPA system to use the
latest RedHat packages.  LON-CAPA uses CHECKRPMS to notify users their system
needs updating.  
<pre>
/usr/local/loncapa/bin/CHECKRPMS
</pre>
CHECKRPMS will give you the option of downloading the updates you need.
Say yes.  Then issue the following commands:
<pre>
cd /tmp/loncapa_rpm_updates
rpm -Uvh *
</pre>
</p><p>
You will need to reboot your system to begin running the new Linux Kernel
put out by RedHat.  You can wait until the end of the LON-CAPA installation
process to reboot.
</p><p>
Congratulate yourself - your system is up to date.  Please do your best to
keep it that way!  When LON-CAPA is installed it sets itself up to run 
CHECKRPMS script every night and email you the results.  
<b>Please do not ignore these emails.</b>  
You will need to update the RPMs yourself when it notifies you.  
Keeping your system up-to-date goes a long way towards ensuring the 
integrity of your student records.
</p>

<h2>Picking a hosts.tab file</h2>
<p>
The "hosts.tab" file controls which LON-CAPA servers your server attempts 
to access and which servers it will respond to.  If this is your first 
install of LON-CAPA on your network, we suggest choosing a 'standalone' 
"hosts.tab".  On a laptop, you must choose 'standalone'.
Please contact the support staff at www.loncapa.org for
information about adding more hosts to your "hosts.tab" file.
</p>
<p>
<b>Note:</b> for <b>non</b>-standalone configurations, you do need to add 
yourself  to the <tt>/home/httpd/lonTabs/hosts.tab</tt> to initially test your 
configuration. Eventually, you will be added to the general cluster tables by
LON-CAPA staff, so this is temporary. A <tt>hosts.tab</tt> entry has the 
format
</p>
<pre>
lonHostID:domain:hosttype:dns-name:ipaddress
</pre>
<p>
for example
</p>
<pre>
103l5:library:s17.lite.msu.edu:35.8.63.27
</pre>
<p>
Please edit this file with a UNIX editor, not a PC or Mac one, so that the 
linebreaks are correct.
</p>

<h2>Creating a Domain Coordinator</h2>
<p>
You will need at least one user at your site who has the role of
'domain coordinator'.  This user creates accounts for other users and
grants them additional privileges.  The make_domain_coordinator.pl script
invoked below requires that you enter the users password.  The password will
show in plaintext as you type it.  Feel free to use the "passwd username"
command to change it later.  Replace USERNAME and DOMAIN with an 
appropriate user name and your domain.
</p>
<pre>
cd /root/loncapa-N.N/loncom/build
perl make_domain_coordinator.pl USERNAME DOMAIN
(WILL PROMPT FOR PASSWORD HERE)
mkdir ~USERNAME/public_html
chown USERNAME:www ~USERNAME/public_html
chmod 0775 ~USERNAME/public_html
chmod a+x ~USERNAME
</pre>

<h2>Start/Restart Services</h2>
<p>
The LON-CAPA network services take about a minute to start.
</p>
<pre>
/etc/init.d/loncontrol start
/etc/init.d/httpd restart
</pre>

<h2>Make Sure that Services Autostart on Boot</h2>
<p>On Redhat 7.3 it is not guaranteed that Apache and MySQL automatically 
restart on boot.  You should run /usr/sbin/ntsysv and set the following 
daemons to be started at boot:
</p>
<pre>
httpd
mysqld
</pre>
<p>
It is not necessary to reboot after doing this as they should already be 
running by this point in the installation.  
</p>
<pre>
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
</pre>

<h2>Log in to your LON-CAPA Machine</h2>
<p>
Point a web browser at your new machine and log in as the domain
coordinator.  Congratulations!
</p>


Index: doc/build/upgrade.frag
+++ doc/build/upgrade.frag
<p>
There are three steps for upgrading the software on your LON-CAPA server.
</p>
<ul>
<li><a href="#upgrade">
Upgrading LON-CAPA files</a></li>
<li><a href="#checkrpms">
Checking your Linux RPMs</a></li>
<li><a href="#testing">
Testing to see if the LON-CAPA server is operational</a></li>
</ul>

<h3>Upgrading LON-CAPA files</h3>
<p>
Download the most current
<a href="http://install.lon-capa.org/versions/current/loncapa.tar.gz">
loncapa.tar.gz</a>.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>wget http://install.lon-capa.org/versions/current/loncapa.tar.gz
</tt>
<br />
<tt>tar xzvf loncapa.tar.gz</tt>
<br />
<tt>cd loncapa</tt></td></tr>
</table>
<p>
The <strong>UPDATE</strong> command will refresh your filesystem with all
the latest LON-CAPA software.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./UPDATE</tt></td></tr>
</table>
<a name="checkrpms" />
<h3>Checking your Linux RPMs</h3>
<p>
If you are using RedHat, the <strong>CHECKRPMS</strong> command will check the RPMs on your machine
against an FTP repository. Otherwise, you may need to update software
manually.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./CHECKRPMS</tt></td></tr>
</table>
<a name="testing" />
<h3>Testing to see if the LON-CAPA server is operational</h3>
<p>
The <strong>TEST</strong> command will check the installation software,
the perl libraries on your system, the MySQL database, and
will also automatically test the real-time operation of the 
LON-CAPA Apache web server.
</p>
<table bgcolor="#aaaaaa" border="1">
<tr><td><tt>./TEST</tt></td></tr>
</table>
<p>
Using the <strong>TEST</strong> command will likely
be an iterative process.
It is normal to expect that the <strong>TEST</strong> command
will recommend you perform various steps to ensure optimal
performance of your LON-CAPA server.
</p>

--bowersj21061301224--