File:  [LON-CAPA] / doc / build / Attic / install.html
Revision 1.31: download - view: text, annotated - select for diffs
Thu Jul 18 19:51:31 2002 UTC (21 years, 11 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
cosmetic fix to the integrated RedHat+LON-CAPA directions

    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.31 2002/07/18 19:51:31 harris41 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="#mysql">
   29: Configuring the MySQL database</a></li>
   30: <li><a href="#testing">
   31: Testing to see if the LON-CAPA server is operational</a></li>
   32: </ul>
   33: <p>
   34: <strong>NOTE:</strong>
   35: If you want to simultaneously install both RedHat 7.3 and LON-CAPA
   36: (to ensure 100% reliability), follow <a href="rh73.html">these
   37: alternative directions</a>.
   38: </p>
   39: <ul>
   40: <li><a href="#wwwuser">
   41: Creating a user 'www'</a></li>
   42: <br />&nbsp;
   43: <!-- preamble end -->
   44: <!-- maintext start -->
   45: <a name="wwwuser" />
   46: <h3>Creating a user 'www'</h3>
   47: <p>
   48: Execute the following command to create a user named 'www' on your
   49: LON-CAPA server:
   50: </p>
   51: <table bgcolor="#aaaaaa" border="1"><tr><td>
   52: <tt>/usr/sbin/useradd www</tt>
   53: </td></tr></table>
   54: <a name="shadow" />
   55: <h3>Make a LON-CAPA system work with shadow passwords</h3>
   56: <table border="1">
   57: <tr><th>Step #</th><th>Description</th></tr>
   58: <tr><td>
   59: <font size="+1">1</font>
   60: </td><td>
   61: <p>Is your system using shadow passwords? (Note: LON-CAPA will
   62: work with either MD5/non-MD5 configured systems).  If your
   63: system is not using shadow passwords, then do not perform
   64: any of the additional steps.  If your system is using shadow
   65: passwords, then you will need to perform the additional steps below.
   66: </p>
   67: <p>
   68: <strong>How to detect:</strong>
   69: <br />command: <tt>cat /etc/passwd | grep ':x:'</tt>
   70: </p>
   71: <p>If there is output such as "<tt>root:x:0:0:root:/root:/bin/bash</tt>",
   72: then your system is using shadow passwords and you will need to continue with
   73: the steps below.
   74: </p>
   75: </td></tr>
   76: <tr><td>
   77: <font size='+1'>2</font>
   78: </td><td>
   79: <p><strong>Retrieve the mod_auth_external source</strong> by
   80: running the following command
   81: </p>
   82: <p><tt>
   83: wget http://www.wwnet.net/~janc/software/mod_auth_external-2.1.13.tar.gz
   84: </tt>
   85: </p>
   86: </td></tr>
   87: <tr><td>
   88: <font size='+1'>3</font>
   89: </td><td>
   90: <p><strong>Unpack the mod_auth_external source</strong> by
   91: running the following command
   92: </p>
   93: <p>
   94: <tt>tar xzvf mod_auth_external-2.1.13.tar.gz</tt>
   95: </p>
   96: </td></tr>
   97: <tr><td>
   98: <font size='+1'>4</font>
   99: </td><td>
  100: <p><strong>Go to the <tt>pwauth</tt> directory</strong> by
  101: running the following command
  102: </p>
  103: <p>
  104: <tt>cd mod_auth_external-2.1.13/pwauth/</tt>
  105: </p>
  106: </td></tr>
  107: <tr><td>
  108: <font size='+1'>5</font>
  109: </td><td>
  110: <p><strong>Edit <tt>config.h</tt> and change SERVER_UIDS definition</strong>
  111: </p>
  112: <p>
  113: Determine the user id of 'www':
  114: <br /><tt>grep ^www /etc/passwd | cut -d':' -f3</tt>
  115: <br />
  116: Change the line
  117: <br /><tt>#define SERVER_UIDS 99       /* user "nobody" */</tt>
  118: <br />to be
  119: <br /><tt>#define SERVER_UIDS 513      /* user "www" */</tt>
  120: <br />where in this example 513 corresponds to the user id of 'www'.
  121: </p>
  122: </td></tr>
  123: <tr><td>
  124: <font size='+1'>6</font>
  125: </td><td>
  126: <p><strong>Compile the <tt>pwauth</tt> executable</strong> by
  127: running the following command
  128: </p>
  129: <p>
  130: <tt>make</tt>
  131: </p>
  132: </td></tr>
  133: <tr><td>
  134: <font size='+1'>7</font>
  135: </td><td>
  136: <p><strong>Install <tt>pwauth</tt></strong> by doing the following
  137: </p>
  138: <p>
  139: <tt>cp pwauth /usr/local/sbin/</tt>
  140: <br /><tt>chmod 6755 /usr/local/sbin/pwauth</tt>
  141: </p>
  142: <p>
  143: Edit (creating the file) /etc/pam.d/pwauth to have the contents:
  144: </p>
  145: <pre>
  146:         auth       required     /lib/security/pam_pwdb.so shadow nullok
  147:         auth       required     /lib/security/pam_nologin.so
  148:         account    required     /lib/security/pam_pwdb.so
  149: </pre>
  150: </td></tr>
  151: </table>
  152: <a name="install" />
  153: <h3>Installing LON-CAPA files</h3>
  154: <p>
  155: Download the most current
  156: <a href="http://install.lon-capa.org/versions/current/loncapa.tar.gz">
  157: loncapa.tar.gz</a>.
  158: </p>
  159: <table bgcolor="#aaaaaa" border="1">
  160: <tr><td><tt>wget http://install.lon-capa.org/versions/current/loncapa.tar.gz
  161: </tt>
  162: <br />
  163: <tt>tar xzvf loncapa.tar.gz</tt>
  164: <br />
  165: <tt>cd loncapa</tt></td></tr>
  166: </table>
  167: <p>
  168: The <strong>UPDATE</strong> command will refresh your filesystem with all
  169: the latest LON-CAPA software.
  170: </p>
  171: <table bgcolor="#aaaaaa" border="1">
  172: <tr><td><tt>./UPDATE</tt></td></tr>
  173: </table>
  174: <a name="checkrpms" />
  175: <h3>Checking your Linux RPMs</h3>
  176: <p>
  177: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
  178: against an FTP repository.
  179: </p>
  180: <table bgcolor="#aaaaaa" border="1">
  181: <tr><td><tt>./CHECKRPMS</tt></td></tr>
  182: </table>
  183: <a name="mysql" />
  184: <h3>Configuring the MySQL database</h3>
  185: <p>
  186: The following commands describe how to configure the MySQL database
  187: on your LON-CAPA server.
  188: <br />Note:
  189: </p>
  190: <ul>
  191: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
  192: (it does not have to be the Linux OS root password)
  193: </li>
  194: <li>The MySQL www@localhost user must always have a password of 'localhostkey'
  195: in order for there to be correct operation of a standard LON-CAPA system.
  196: </li>
  197: </ul>
  198: <p>
  199: The following instructions assume you are logged in as 'root'.
  200: </p>
  201: <p>Entering the mysql shell</p>
  202: <table bgcolor="#aaaaaa" border="1"><tr><td>
  203: <pre>
  204: mysql -u root -p mysql
  205: OR
  206: mysql -u root mysql (depending on whether you have set a root password)
  207: </pre>
  208: </td></tr></table>
  209: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
  210: <table bgcolor="#aaaaaa" border="1"><tr><td>
  211: <pre>
  212: mysql> CREATE DATABASE loncapa;
  213: 
  214: mysql> INSERT INTO user (Host, User, Password)
  215: mysql> VALUES ('localhost','www',password('localhostkey'));
  216: 
  217: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
  218: 
  219: mysql> FLUSH PRIVILEGES;
  220: </pre>
  221: </td></tr></table>
  222: <p>SECURITY: set a password for the mysql 'root' user</p>
  223: <table bgcolor="#aaaaaa" border="1"><tr><td>
  224: <pre>
  225: shell> mysql -u root mysql
  226: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
  227: </pre>
  228: </td></tr></table>
  229: <p>SECURITY: only allow access from localhost</p>
  230: <table bgcolor="#aaaaaa" border="1"><tr><td>
  231: <pre>
  232: shell> mysql -u root -p mysql
  233: mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
  234: </pre>
  235: </td></tr></table>
  236: <a name="testing" />
  237: <h3>Testing to see if the LON-CAPA server is operational</h3>
  238: <p>
  239: The <strong>TEST</strong> command will check the installation software,
  240: the perl libraries on your system, the MySQL database, and
  241: will also automatically test the real-time operation of the 
  242: LON-CAPA Apache web server.
  243: </p>
  244: <table bgcolor="#aaaaaa" border="1">
  245: <tr><td><tt>./TEST</tt></td></tr>
  246: </table>
  247: <p>
  248: Using the <strong>TEST</strong> command will likely
  249: be an iterative process.
  250: It is normal to expect that the <strong>TEST</strong> command
  251: will recommend you perform various steps to ensure optimal
  252: performance of your LON-CAPA server.
  253: </p>
  254: <!-- maintext end -->
  255: <!-- validated -->
  256: </body>
  257: </html>

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