Annotation of doc/build/install.html, revision 1.31

1.18      harris41    1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      2:  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.11      harris41    3: <!-- The LearningOnline Network with CAPA -->
1.31    ! harris41    4: <!-- $Id: install.html,v 1.30 2002/07/11 05:05:36 harris41 Exp $ -->
1.11      harris41    5: <html>
                      6: <head>
1.18      harris41    7: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
1.11      harris41    8: <title>LON-CAPA Installation</title>
1.12      harris41    9: <!-- pdfahref install.pdf -->
                     10: <!-- button INSTALL -->
1.11      harris41   11: </head>
1.12      harris41   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.
1.18      harris41   18: </p>
1.12      harris41   19: <ul>
1.13      harris41   20: <li><a href="#wwwuser">
                     21: Creating a user 'www'</a></li>
                     22: <li><a href="#shadow">
1.12      harris41   23: Make a LON-CAPA system work with shadow passwords</a></li>
1.13      harris41   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>
1.15      harris41   30: <li><a href="#testing">
                     31: Testing to see if the LON-CAPA server is operational</a></li>
1.12      harris41   32: </ul>
1.31    ! harris41   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>
1.12      harris41   42: <br />&nbsp;
                     43: <!-- preamble end -->
                     44: <!-- maintext start -->
1.13      harris41   45: <a name="wwwuser" />
                     46: <h3>Creating a user 'www'</h3>
                     47: <p>
1.14      harris41   48: Execute the following command to create a user named 'www' on your
                     49: LON-CAPA server:
1.13      harris41   50: </p>
1.14      harris41   51: <table bgcolor="#aaaaaa" border="1"><tr><td>
                     52: <tt>/usr/sbin/useradd www</tt>
                     53: </td></tr></table>
1.13      harris41   54: <a name="shadow" />
1.12      harris41   55: <h3>Make a LON-CAPA system work with shadow passwords</h3>
1.14      harris41   56: <table border="1">
1.12      harris41   57: <tr><th>Step #</th><th>Description</th></tr>
                     58: <tr><td>
1.14      harris41   59: <font size="+1">1</font>
1.12      harris41   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>
1.13      harris41   87: <tr><td>
                     88: <font size='+1'>3</font>
                     89: </td><td>
1.17      harris41   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'.
1.13      harris41  121: </p>
1.17      harris41  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:
1.18      harris41  144: </p>
1.17      harris41  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>
1.13      harris41  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>
1.25      harris41  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>
1.26      harris41  164: <br />
1.25      harris41  165: <tt>cd loncapa</tt></td></tr>
                    166: </table>
1.14      harris41  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>
1.13      harris41  174: <a name="checkrpms" />
                    175: <h3>Checking your Linux RPMs</h3>
                    176: <p>
1.14      harris41  177: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
                    178: against an FTP repository.
1.13      harris41  179: </p>
1.14      harris41  180: <table bgcolor="#aaaaaa" border="1">
1.13      harris41  181: <tr><td><tt>./CHECKRPMS</tt></td></tr>
1.12      harris41  182: </table>
1.13      harris41  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.
1.19      harris41  188: <br />Note:
1.12      harris41  189: </p>
1.19      harris41  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>
1.29      harris41  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.
1.27      harris41  196: </li>
1.19      harris41  197: </ul>
1.23      harris41  198: <p>
                    199: The following instructions assume you are logged in as 'root'.
                    200: </p>
1.20      harris41  201: <p>Entering the mysql shell</p>
1.14      harris41  202: <table bgcolor="#aaaaaa" border="1"><tr><td>
1.13      harris41  203: <pre>
                    204: mysql -u root -p mysql
1.19      harris41  205: OR
1.22      harris41  206: mysql -u root mysql (depending on whether you have set a root password)
1.19      harris41  207: </pre>
                    208: </td></tr></table>
1.20      harris41  209: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
1.19      harris41  210: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    211: <pre>
                    212: mysql> CREATE DATABASE loncapa;
1.13      harris41  213: 
1.19      harris41  214: mysql> INSERT INTO user (Host, User, Password)
1.27      harris41  215: mysql> VALUES ('localhost','www',password('localhostkey'));
1.13      harris41  216: 
1.19      harris41  217: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
1.13      harris41  218: 
1.19      harris41  219: mysql> FLUSH PRIVILEGES;
                    220: </pre>
                    221: </td></tr></table>
1.20      harris41  222: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19      harris41  223: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    224: <pre>
1.13      harris41  225: shell> mysql -u root mysql
1.19      harris41  226: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
                    227: </pre>
                    228: </td></tr></table>
1.20      harris41  229: <p>SECURITY: only allow access from localhost</p>
1.19      harris41  230: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    231: <pre>
                    232: shell> mysql -u root -p mysql
1.28      harris41  233: mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
1.13      harris41  234: </pre>
                    235: </td></tr></table>
1.15      harris41  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>
1.16      harris41  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>
1.12      harris41  254: <!-- maintext end -->
1.18      harris41  255: <!-- validated -->
1.11      harris41  256: </body>
                    257: </html>

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