Annotation of doc/gutshtml/Configuration, revision 1.2
1.2 ! harris41 1: <html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Title content=Configuration>
<meta name=Keywords content="">
<meta http-equiv=Content-Type content="text/html; charset=macintosh">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="Configuration_files/filelist.xml">
<title>Configuration</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Gerd Kortemeyer</o:Author>
<o:Template>Normal</o:Template>
<o:Revision>1</o:Revision>
<o:TotalTime>0</o:TotalTime>
<o:Created>2002-06-27T21:54:00Z</o:Created>
<o:Pages>1</o:Pages>
<o:Words>970</o:Words>
<o:Characters>5530</o:Characters>
<o:Company>Michigan State University</o:Company>
<o:Lines>46</o:Lines>
<o:Paragraphs>11</o:Paragraphs>
<o:CharactersWithSpaces>6791</o:CharactersWithSpaces>
<o:Version>10.1412</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:DownloadComponents>120</o:DownloadComponents>
<o:PixelsPerInch>1600x1200</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>0</w:Zoom>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
<w:UseMarginsForDrawingGridOrigin/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Times New Roman";
panose-1:0 2 2 6 3 5 4 5 2 3;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:50331648 0 0 0 1 0;}
@font-face
{font-family:Arial;
panose-1:0 2 11 6 4 2 2 2 2 2;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:50331648 0 0 0 1 0;}
@font-face
{font-family:"Courier New";
panose-1:0 2 7 3 9 2 2 5 2 4;
mso-font-charset:0;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:50331648 0 0 0 1 0;}
@font-face
{font-family:Wingdings;
panose-1:0 5 2 1 2 1 8 4 8 7;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 16 0 0 -2147483648 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:Times;}
h1
{mso-style-next:Normal;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:14.0pt;
font-family:"Times New Roman";
mso-font-kerning:0pt;
font-weight:bold;}
h2
{mso-style-next:Normal;
margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:2;
font-size:12.0pt;
font-family:Arial;
font-weight:bold;
font-style:italic;}
p
{margin-right:0in;
mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
font-size:10.0pt;
font-family:"Courier New";}
tt {}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
@page Section2
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section2
{page:Section2;}
/* List Definitions */
@list l0
{mso-list-id:327758729;
mso-list-type:hybrid;
mso-list-template-ids:-1719493232 152049158 934189928 1555595414 1875433088 -1807840162 2021663332 -1341988866 -683656224 1280233374;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-size:10.0pt;
font-family:Symbol;}
@list l1
{mso-list-id:1119102670;
mso-list-type:hybrid;
mso-list-template-ids:-547981892 248174682 -1208076058 1074405302 -854554068 1195519244 -1842685672 474115186 -1145029298 745933714;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-size:10.0pt;
font-family:Symbol;}
@list l2
{mso-list-id:2003316184;
mso-list-type:hybrid;
mso-list-template-ids:-278242198 -1298266892 1036026122 -184804828 633238172 628288222 47898532 575421194 1576021750 340301200;}
@list l2:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body bgcolor=white lang=EN-US style='tab-interval:.5in'>
<div class=Section1>
<h1>Configuration</h1>
<p><i>Scott Harrison, freeware volunteer, sharrison@sourceforge.net</i><span
style='font-style:normal'> </span></p>
<h2><a name="_Toc421867172">Configuring the Apache Web Server</a></h2>
<p>The configuring of the Apache Web Server and the input of LON-CAPA
configuration values is handled automatically by the <tt><span
style='font-family:"Courier New"'>./UPDATE</span></tt> command. In this
document, the details of what the <tt><span style='font-family:"Courier New"'>./UPDATE</span></tt>
command facilitates are described. </p>
<p><tt><span style='font-family:"Courier New"'>/etc/httpd/conf/httpd.conf</span></tt>
is adjusted to include the LON-CAPA web server configuration. This happens by
appending the following line to <tt><span style='font-family:"Courier New"'>httpd.conf</span></tt>:
</p>
<table border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><tt><span style='font-family:"Courier New"'>Include
conf/loncapa_apache.conf</span></tt> </p>
</td>
</tr>
</table>
<p>The <tt><span style='font-family:"Courier New"'>/etc/httpd/conf/loncapa_apache.conf</span></tt>
file customizes the Apache Web Server to have the needed configuration to
deliver LON-CAPA on the world-wide web. The <tt><span style='font-family:"Courier New"'>loncapa_apache.conf</span></tt>
file does not contain any information specified by the system administrator.
The <tt><span style='font-family:"Courier New"'>loncapa_apache.conf</span></tt>
file does, however, cause <tt><span style='font-family:"Courier New"'>loncapa.conf</span></tt>
to be included. <tt><span style='font-family:"Courier New"'>/etc/httpd/conf/loncapa.conf</span></tt>
contains only information specified by the system administrator. Generally
speaking, the information inside <tt><span style='font-family:"Courier New"'>/etc/httpd/conf/loncapa.conf</span></tt>
is machine-specific (each LON-CAPA server has its own specific values inside <tt><span
style='font-family:"Courier New"'>loncapa.conf</span></tt>). </p>
<p><tt><span style='font-family:"Courier New"'>/etc/httpd/conf/loncapa_apache.conf</span></tt>
performs the following customizations of the Apache Web Server: </p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>The document root of all the
web pages is set to be <tt><span style='font-family:"Courier New"'>/home/httpd/html/</span></tt>.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>The web httpd user is set to
be 'www'. The web httpd group is set to be 'www'. This means that all web
processes only have the authorities granted by the Linux system to
user=www and group=www. </li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>Shared object modules are
supported for the perl language (mod-perl). </li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>A print spool alias and a
cgi-bin script alias are specified.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>Access handlers are specified
for published educational resources, author construction spaces, and raw
binary data access.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>50 different URI syntaxes are
assigned to web handlers present inside <tt><span style='font-family:"Courier New"'>/home/httpd/lib/perl/Apache/</span></tt>.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>Directory options are set for
'<tt><span style='font-family:"Courier New"'>/</span></tt>' and '<tt><span
style='font-family:"Courier New"'>/home/httpd/html/</span></tt>'.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'>General configuration values
are specified that can be accessed by the perl web handler modules; e.g.
lonTabDir=/home/httpd/lonTabs, londPort=5663, etc.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l2 level1 lfo1;tab-stops:list .5in'><tt><span style='font-family:
"Courier New"'>/etc/httpd/conf/startup.pl</span></tt> is invoked to test
and load the perl web handler modules into memory for the httpd web server
processes.</li>
</ul>
<p class=MsoNormal><tt><span style='font-family:"Courier New"'>/etc/httpd/conf/loncapa.conf</span></tt>
specifies machine-specific values that are accessible to the perl web handler
modules. Ordinarily, these values are not to be entered manually. These values
are interactively solicited from the system administrator by the <tt><span
style='font-family:"Courier New"'>loncapa/doc/loncapafiles/updatequery.piml</span></tt>
file. The following values comprise the <tt><span style='font-family:"Courier New"'>loncapa.conf</span></tt>
file: </p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'><strong>LON Host ID
("Machine Name")</strong> <br>
is an internal ID within the LON-CAPA network used to specify the
uniqueness of a particular LON-CAPA server.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'><strong>LON System
Administrator E-Mail</strong> <br>
specifies the e-mail address of an institutional member responsible for
direct upkeep of this server. </li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'><strong>LON Domain
("Domain Name")</strong> <br>
is a unique internal identifier within the LON-CAPA network specific to
the home institution; A LON-CAPA domain is a collection of load-balancing
institutional machines forming a cluster of LON-CAPA servers. It has
nothing to do with the many other meanings for the word
"domain", such as "domain names" like
"loncapa.org", or Windows file server domains. If you are
installing a LON-CAPA server for testing purposes, it is safe to create
your own domain name for testing. You should ask the person running a real
domain before adding your computer to their domain.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'><strong>LON Load Limit
("Server Load")</strong> <br>
specifies a threshold of activity within The LearningOnline Network that
this machine should provide. The recommended value is 2.00. Depending on
processor architecture (dual processor), this value may be increased, but
there is no readily available measure in this regard.</li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo2;tab-stops:list .5in'><strong>Cache Expiration Time</strong>
<br>
indicates, in seconds, how long distributed resources should be held in
the server's cache when not being accessed by students, instructors, or
any other class of user. The recommended value is 86400. </li>
</ul>
<h2><a name="_Toc421867173">Configuring the LON-CAPA Network</a></h2>
<p>In order for LON-CAPA to connect to other servers that provide educational
resources or to balance the load of high-volume web-requests, there needs to be
a way to access information that describes the other LON-CAPA servers present
on the internet. </p>
<p><tt><span style='font-family:"Courier New"'>/home/httpd/lonTabs/hosts.tab</span></tt>
defines all of the other machines that a given LON-CAPA server can interact
with. (In a sense, this is a mechanism of security so that connections cannot
be attempted from spurious entities.) </p>
<p>The format of <tt><span style='font-family:"Courier New"'>hosts.tab</span></tt>
is to define each LON-CAPA server on separate lines. Each line is
field-separated by colons ':'.</p>
<p>An example entry in <tt><span style='font-family:"Courier New"'>hosts.tab</span></tt>
is: </p>
<table border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><tt><span style='font-family:"Courier New"'>vulon1:msuvu:library:loncapa3.vu.msu.edu:35.9.80.250</span></tt>
</p>
</td>
</tr>
</table>
<p>The first field is the LON Host ID (see the above description of <tt><span
style='font-family:"Courier New"'>loncapa.conf</span></tt>). The second field
is the Domain Name. The third field is the server type (see the section
"Different Types of LON-CAPA Servers"). The fourth field is a
DNS-registered full IP name. The fifth field is the numeric IP address. </p>
<p><tt><span style='font-family:"Courier New"'>/home/httpd/lonTabs/spare.tab</span></tt>
is a list of LON Host IDs corresponding to Access Servers (or Library Servers).
<tt><span style='font-family:"Courier New"'>spare.tab</span></tt> should not be
the same on every LON-CAPA server machine. The purpose of this list is to
specify other servers toward which user web requests can be re-directed.
Current experience is that the servers on <tt><span style='font-family:"Courier New"'>spare.tab</span></tt>
are particularly active (and much needed) shortly before homework assignments
are due.... </p>
<p>An example of <tt><span style='font-family:"Courier New"'>spare.tab</span></tt>
relates to the Library Server <strong>vulon1</strong> which load-balances the
requests onto two other Access Servers as shown in the example <tt><span
style='font-family:"Courier New"'>spare.tab</span></tt> below: </p>
<table border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><tt><span style='font-family:"Courier New"'>vulona1</span></tt>
<br>
<tt><span style='font-family:"Courier New"'>vulona2</span></tt> </p>
</td>
</tr>
</table>
<h2><a name="_Toc421867174">Configuring MySQL</a></h2>
<p>The following commands describe how to configure the MySQL database on your
LON-CAPA server. <br>
Note: </p>
<ul type=disc>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'>you should substitute
'ROOTPASSWORD' with something very hard to guess (it does not have to be
the Linux OS root password) </li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l1 level1 lfo3;tab-stops:list .5in'>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 border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'><pre><span style="mso-spacerun: yes"> </span>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 border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'><pre><span style="mso-spacerun: yes"> </span>mysql> CREATE DATABASE loncapa;<span style="mso-spacerun: yes"> </span>mysql> INSERT INTO user (Host, User, Password) mysql> VALUES ('localhost','www',password('localhostkey'));<span style="mso-spacerun: yes"> </span>mysql> GRANT ALL PRIVILEGES ON loncapa.* TO www@localhost;<span style="mso-spacerun: yes"> </span>mysql> FLUSH PRIVILEGES; </pre></td>
</tr>
</table>
<p>SECURITY: set a password for the mysql 'root' user</p>
<table border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'><pre><span style="mso-spacerun: yes"> </span>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 border=1 cellpadding=0 bgcolor="#aaaaaa" style='mso-cellspacing:1.5pt;
background:#AAAAAA'>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'><pre><span style="mso-spacerun: yes"> </span>shell> mysql -u root -p mysql mysql> DELETE FROM user WHERE host<>'localhost'; </pre></td>
</tr>
</table>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
<span style='font-size:12.0pt;font-family:Times;mso-ansi-language:EN-US'><br
clear=ALL style='mso-special-character:line-break;page-break-before:always'>
</span>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
</div>
<span style='font-size:12.0pt;font-family:Times;mso-ansi-language:EN-US'><br
clear=ALL style='page-break-before:always;mso-break-type:section-break'>
</span>
<div class=Section2>
<p class=MsoNormal><![if !supportEmptyParas]> <![endif]><o:p></o:p></p>
</div>
</body>
</html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>