File:  [LON-CAPA] / doc / build / Attic / install.html
Revision 1.30: download - view: text, annotated - select for diffs
Thu Jul 11 05:05:36 2002 UTC (22 years, 1 month ago) by harris41
Branches: MAIN
CVS tags: HEAD
implementing a pointer to the redhat 7.3 install document

    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.30 2002/07/11 05:05:36 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 align="center">
   16: <a href="rh73.html">
   17: <b><font size="+0"><font color='#ff0000'>CLICK ON THIS RED LINK </font></font>
   18: <br />
   19: <font size="+3">
   20: <font color='#ff0000'>*ALTERNATIVE FAST-TRACK*</font></font>
   21: <br />
   22: <font size="+0"><font color='#ff0000'>INSTRUCTIONS ALSO AVAILABLE</font></font>
   23: </b>
   24: </a>
   25: </p>
   26: <p>
   27: You will need to check all the following things to ensure proper
   28: installation of your LON-CAPA system.
   29: </p>
   30: <ul>
   31: <li><a href="#wwwuser">
   32: Creating a user 'www'</a></li>
   33: <li><a href="#shadow">
   34: Make a LON-CAPA system work with shadow passwords</a></li>
   35: <li><a href="#install">
   36: Installing LON-CAPA files</a></li>
   37: <li><a href="#checkrpms">
   38: Checking your Linux RPMs</a></li>
   39: <li><a href="#mysql">
   40: Configuring the MySQL database</a></li>
   41: <li><a href="#testing">
   42: Testing to see if the LON-CAPA server is operational</a></li>
   43: </ul>
   44: <br />&nbsp;
   45: <!-- preamble end -->
   46: <!-- maintext start -->
   47: <a name="wwwuser" />
   48: <h3>Creating a user 'www'</h3>
   49: <p>
   50: Execute the following command to create a user named 'www' on your
   51: LON-CAPA server:
   52: </p>
   53: <table bgcolor="#aaaaaa" border="1"><tr><td>
   54: <tt>/usr/sbin/useradd www</tt>
   55: </td></tr></table>
   56: <a name="shadow" />
   57: <h3>Make a LON-CAPA system work with shadow passwords</h3>
   58: <table border="1">
   59: <tr><th>Step #</th><th>Description</th></tr>
   60: <tr><td>
   61: <font size="+1">1</font>
   62: </td><td>
   63: <p>Is your system using shadow passwords? (Note: LON-CAPA will
   64: work with either MD5/non-MD5 configured systems).  If your
   65: system is not using shadow passwords, then do not perform
   66: any of the additional steps.  If your system is using shadow
   67: passwords, then you will need to perform the 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.wwnet.net/~janc/software/mod_auth_external-2.1.13.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.13.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.13/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>grep ^www /etc/passwd | cut -d':' -f3</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/current/loncapa.tar.gz">
  159: loncapa.tar.gz</a>.
  160: </p>
  161: <table bgcolor="#aaaaaa" border="1">
  162: <tr><td><tt>wget http://install.lon-capa.org/versions/current/loncapa.tar.gz
  163: </tt>
  164: <br />
  165: <tt>tar xzvf loncapa.tar.gz</tt>
  166: <br />
  167: <tt>cd loncapa</tt></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: <a name="mysql" />
  186: <h3>Configuring the MySQL database</h3>
  187: <p>
  188: The following commands describe how to configure the MySQL database
  189: on your LON-CAPA server.
  190: <br />Note:
  191: </p>
  192: <ul>
  193: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
  194: (it does not have to be the Linux OS root password)
  195: </li>
  196: <li>The MySQL www@localhost user must always have a password of 'localhostkey'
  197: in order for there to be correct operation of a standard LON-CAPA system.
  198: </li>
  199: </ul>
  200: <p>
  201: The following instructions assume you are logged in as 'root'.
  202: </p>
  203: <p>Entering the mysql shell</p>
  204: <table bgcolor="#aaaaaa" border="1"><tr><td>
  205: <pre>
  206: mysql -u root -p mysql
  207: OR
  208: mysql -u root mysql (depending on whether you have set a root password)
  209: </pre>
  210: </td></tr></table>
  211: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
  212: <table bgcolor="#aaaaaa" border="1"><tr><td>
  213: <pre>
  214: mysql> CREATE DATABASE loncapa;
  215: 
  216: mysql> INSERT INTO user (Host, User, Password)
  217: mysql> VALUES ('localhost','www',password('localhostkey'));
  218: 
  219: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
  220: 
  221: mysql> FLUSH PRIVILEGES;
  222: </pre>
  223: </td></tr></table>
  224: <p>SECURITY: set a password for the mysql 'root' user</p>
  225: <table bgcolor="#aaaaaa" border="1"><tr><td>
  226: <pre>
  227: shell> mysql -u root mysql
  228: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
  229: </pre>
  230: </td></tr></table>
  231: <p>SECURITY: only allow access from localhost</p>
  232: <table bgcolor="#aaaaaa" border="1"><tr><td>
  233: <pre>
  234: shell> mysql -u root -p mysql
  235: mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
  236: </pre>
  237: </td></tr></table>
  238: <a name="testing" />
  239: <h3>Testing to see if the LON-CAPA server is operational</h3>
  240: <p>
  241: The <strong>TEST</strong> command will check the installation software,
  242: the perl libraries on your system, the MySQL database, and
  243: will also automatically test the real-time operation of the 
  244: LON-CAPA Apache web server.
  245: </p>
  246: <table bgcolor="#aaaaaa" border="1">
  247: <tr><td><tt>./TEST</tt></td></tr>
  248: </table>
  249: <p>
  250: Using the <strong>TEST</strong> command will likely
  251: be an iterative process.
  252: It is normal to expect that the <strong>TEST</strong> command
  253: will recommend you perform various steps to ensure optimal
  254: performance of your LON-CAPA server.
  255: </p>
  256: <!-- maintext end -->
  257: <!-- validated -->
  258: </body>
  259: </html>

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