File:  [LON-CAPA] / doc / build / Attic / install.html
Revision 1.40: download - view: text, annotated - select for diffs
Fri May 2 19:25:01 2003 UTC (21 years, 2 months ago) by albertel
Branches: MAIN
CVS tags: version_1_0_3, version_1_0_2, version_1_0_1, version_1_0_0, version_0_99_5, version_0_99_4, version_0_99_3, version_0_99_2, version_0_99_1, version_0_99_0, conference_2003, HEAD
- adding in Martin Siegert's corrections

    1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    2:  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3: <!-- The LearningOnline Network with CAPA -->
    4: <!-- $Id: install.html,v 1.40 2003/05/02 19:25:01 albertel Exp $ -->
    5: <html>
    6: <head>
    7: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    8: <title>LON-CAPA Installation</title>
    9: <!-- pdfahref install.pdf -->
   10: <!-- button INSTALL -->
   11: </head>
   12: <body bgcolor='#ffffff'>
   13: <!-- preamble start -->
   14: <br />&nbsp;
   15: <p>
   16: You will need to check all the following things to ensure proper
   17: installation of your LON-CAPA system.
   18: </p>
   19: <ul>
   20: <li><a href="#wwwuser">
   21: Creating a user 'www'</a></li>
   22: <li><a href="#shadow">
   23: Make a LON-CAPA system work with shadow passwords</a></li>
   24: <li><a href="#install">
   25: Installing LON-CAPA files</a></li>
   26: <li><a href="#checkrpms">
   27: Checking your Linux RPMs</a></li>
   28: <li><a href="#fixhosts">
   29: Fixing <tt>/etc/hosts</tt></a></li>
   30: <li><a href="#mysql">
   31: Configuring the MySQL database</a></li>
   32: <li><a href="#testing">
   33: Testing to see if the LON-CAPA server is operational</a></li>
   34: </ul>
   35: <p>
   36: <strong>NOTE:</strong>
   37: If you want to simultaneously install both RedHat 7.3 and LON-CAPA
   38: (to ensure 100% reliability), follow <a href="rh73.html">these
   39: alternative directions</a>.
   40: </p>
   41: <br />&nbsp;
   42: <!-- preamble end -->
   43: <!-- maintext start -->
   44: <a name="wwwuser" />
   45: <h3>Creating a user 'www'</h3>
   46: <p>
   47: Execute the following command to create a user named 'www' on your
   48: LON-CAPA server:
   49: </p>
   50: <table bgcolor="#aaaaaa" border="1"><tr><td>
   51: <tt>/usr/sbin/useradd www</tt>
   52: </td></tr></table>
   53: <a name="shadow" />
   54: <h3>Make a LON-CAPA system work with shadow passwords</h3>
   55: <table border="1">
   56: <tr><th>Step #</th><th>Description</th></tr>
   57: <tr><td>
   58: <font size="+1">1</font>
   59: </td><td>
   60: <p>Is your system using shadow passwords? (Note: LON-CAPA will work
   61: with either MD5/non-MD5 configured systems).  It is strongly
   62: recommended to use shadow passwords. If your system is currently not
   63: using shadow passwords, run the "pwconv" command (as root) in order to
   64: convert to shadow passwords.  If you choose not to use shadow
   65: passwords, then do not perform any of the additional steps.  If your
   66: system is using shadow passwords, then you will need to perform the
   67: additional steps below. 
   68: </p>
   69: <p>
   70: <strong>How to detect:</strong>
   71: <br />command: <tt>cat /etc/passwd | grep ':x:'</tt>
   72: </p>
   73: <p>If there is output such as "<tt>root:x:0:0:root:/root:/bin/bash</tt>",
   74: then your system is using shadow passwords and you will need to continue with
   75: the steps below.
   76: </p>
   77: </td></tr>
   78: <tr><td>
   79: <font size='+1'>2</font>
   80: </td><td>
   81: <p><strong>Retrieve the mod_auth_external source</strong> by
   82: running the following command
   83: </p>
   84: <p><tt>
   85: wget http://www.unixpapa.com/software/mod_auth_external-2.1.15.tar.gz
   86: </tt>
   87: </p>
   88: </td></tr>
   89: <tr><td>
   90: <font size='+1'>3</font>
   91: </td><td>
   92: <p><strong>Unpack the mod_auth_external source</strong> by
   93: running the following command
   94: </p>
   95: <p>
   96: <tt>tar xzvf mod_auth_external-2.1.15.tar.gz</tt>
   97: </p>
   98: </td></tr>
   99: <tr><td>
  100: <font size='+1'>4</font>
  101: </td><td>
  102: <p><strong>Go to the <tt>pwauth</tt> directory</strong> by
  103: running the following command
  104: </p>
  105: <p>
  106: <tt>cd mod_auth_external-2.1.15/pwauth/</tt>
  107: </p>
  108: </td></tr>
  109: <tr><td>
  110: <font size='+1'>5</font>
  111: </td><td>
  112: <p><strong>Edit <tt>config.h</tt> and change SERVER_UIDS definition</strong>
  113: </p>
  114: <p>
  115: Determine the user id of 'www':
  116: <br /><tt>id -u www</tt>
  117: <br />
  118: Change the line
  119: <br /><tt>#define SERVER_UIDS 99       /* user "nobody" */</tt>
  120: <br />to be
  121: <br /><tt>#define SERVER_UIDS 513      /* user "www" */</tt>
  122: <br />where in this example 513 corresponds to the user id of 'www'.
  123: </p>
  124: </td></tr>
  125: <tr><td>
  126: <font size='+1'>6</font>
  127: </td><td>
  128: <p><strong>Compile the <tt>pwauth</tt> executable</strong> by
  129: running the following command
  130: </p>
  131: <p>
  132: <tt>make</tt>
  133: </p>
  134: </td></tr>
  135: <tr><td>
  136: <font size='+1'>7</font>
  137: </td><td>
  138: <p><strong>Install <tt>pwauth</tt></strong> by doing the following
  139: </p>
  140: <p>
  141: <tt>cp pwauth /usr/local/sbin/</tt>
  142: <br /><tt>chmod 6755 /usr/local/sbin/pwauth</tt>
  143: </p>
  144: <p>
  145: Edit (creating the file) /etc/pam.d/pwauth to have the contents:
  146: </p>
  147: <pre>
  148:         auth       required     /lib/security/pam_pwdb.so shadow nullok
  149:         auth       required     /lib/security/pam_nologin.so
  150:         account    required     /lib/security/pam_pwdb.so
  151: </pre>
  152: </td></tr>
  153: </table>
  154: <a name="install" />
  155: <h3>Installing LON-CAPA files</h3>
  156: <p>
  157: Download the most current
  158: <a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz">
  159: loncapa-current.tar.gz</a>.
  160: </p>
  161: <table bgcolor="#aaaaaa" border="1">
  162: <tr><td><tt>wget http://install.lon-capa.org/versions/loncapa-current.tar.gz
  163: </tt>
  164: <br />
  165: <tt>tar xzvf loncapa-current.tar.gz</tt>
  166: <br />
  167: <tt>cd loncapa-N.N</tt> (N.N is the version number)</td></tr>
  168: </table>
  169: <p>
  170: The <strong>UPDATE</strong> command will refresh your filesystem with all
  171: the latest LON-CAPA software.
  172: </p>
  173: <table bgcolor="#aaaaaa" border="1">
  174: <tr><td><tt>./UPDATE</tt></td></tr>
  175: </table>
  176: <a name="checkrpms" />
  177: <h3>Checking your Linux RPMs</h3>
  178: <p>
  179: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
  180: against an FTP repository.
  181: </p>
  182: <table bgcolor="#aaaaaa" border="1">
  183: <tr><td><tt>./CHECKRPMS</tt></td></tr>
  184: </table>
  185: <p>
  186: Also, please be sure to install the LON-CAPA-systemperl RPM as described on
  187: the <a href="/docs/downloads/index.html">Downloads</a> page.
  188: </p>
  189: <a name="fixhosts" />
  190: <h3>Fixing <tt>/etc/hosts</tt></h3>
  191: <p>
  192: A common RedHat glitch of new installations (RedHat's fault, not LON-CAPA)
  193: is the generation of /etc/hosts.
  194: </p>
  195: <p>
  196: It should look something like this (except the <tt>myschool</tt> line
  197: should be replaced with settings specific to your machine):
  198: </p>
  199: <table bgcolor="#aaaaaa" border="1">
  200: <tr><td>
  201: <pre>
  202: 127.0.0.1		localhost.localdomain localhost
  203: 12.34.56.78		www.myschool.edu myschool
  204: </pre></td></tr>
  205: </table>
  206: <a name="mysql" />
  207: <h3>Configuring the MySQL database</h3>
  208: <p>
  209: The following commands describe how to configure the MySQL database
  210: on your LON-CAPA server.
  211: <br />Note:
  212: </p>
  213: <ul>
  214: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
  215: (it does not have to be the Linux OS root password)
  216: </li>
  217: <li>The MySQL www@localhost user must always have a password of 'localhostkey'
  218: in order for there to be correct operation of a standard LON-CAPA system.
  219: </li>
  220: </ul>
  221: <p>
  222: The following instructions assume you are logged in as 'root'.
  223: </p>
  224: <p>Entering the mysql shell</p>
  225: <table bgcolor="#aaaaaa" border="1"><tr><td>
  226: <pre>
  227: mysql -u root -p mysql
  228: OR
  229: mysql -u root mysql (depending on whether you have set a root password)
  230: </pre>
  231: </td></tr></table>
  232: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
  233: <table bgcolor="#aaaaaa" border="1"><tr><td>
  234: <pre>
  235: mysql> CREATE DATABASE loncapa;
  236: 
  237: mysql> INSERT INTO user (Host, User, Password)
  238: mysql> VALUES ('localhost','www',password('localhostkey'));
  239: 
  240: mysql> INSERT INTO db VALUES ('localhost','loncapa','www',
  241: mysql> 'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
  242: 
  243: mysql> FLUSH PRIVILEGES;
  244: </pre>
  245: </td></tr></table>
  246: <p>SECURITY: set a password for the mysql 'root' user</p>
  247: <table bgcolor="#aaaaaa" border="1"><tr><td>
  248: <pre>
  249: shell> mysql -u root mysql
  250: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
  251: </pre>
  252: </td></tr></table>
  253: <p>SECURITY: only allow access from localhost</p>
  254: <table bgcolor="#aaaaaa" border="1"><tr><td>
  255: <pre>
  256: shell> mysql -u root -p mysql
  257: mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
  258: </pre>
  259: </td></tr></table>
  260: <a name="testing" />
  261: <h3>Testing to see if the LON-CAPA server is operational</h3>
  262: <p>
  263: The <strong>TEST</strong> command will check the installation software,
  264: the perl libraries on your system, the MySQL database, and
  265: will also automatically test the real-time operation of the 
  266: LON-CAPA Apache web server.
  267: </p>
  268: <table bgcolor="#aaaaaa" border="1">
  269: <tr><td><tt>./TEST</tt></td></tr>
  270: </table>
  271: <p>
  272: Using the <strong>TEST</strong> command will likely
  273: be an iterative process.
  274: It is normal to expect that the <strong>TEST</strong> command
  275: will recommend you perform various steps to ensure optimal
  276: performance of your LON-CAPA server.
  277: </p>
  278: <!-- maintext end -->
  279: <!-- validated -->
  280: </body>
  281: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>