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

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.30    ! harris41    4: <!-- $Id: install.html,v 1.29 2002/06/03 06:13:08 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;
1.30    ! harris41   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>
1.12      harris41   26: <p>
                     27: You will need to check all the following things to ensure proper
                     28: installation of your LON-CAPA system.
1.18      harris41   29: </p>
1.12      harris41   30: <ul>
1.13      harris41   31: <li><a href="#wwwuser">
                     32: Creating a user 'www'</a></li>
                     33: <li><a href="#shadow">
1.12      harris41   34: Make a LON-CAPA system work with shadow passwords</a></li>
1.13      harris41   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>
1.15      harris41   41: <li><a href="#testing">
                     42: Testing to see if the LON-CAPA server is operational</a></li>
1.12      harris41   43: </ul>
                     44: <br />&nbsp;
                     45: <!-- preamble end -->
                     46: <!-- maintext start -->
1.13      harris41   47: <a name="wwwuser" />
                     48: <h3>Creating a user 'www'</h3>
                     49: <p>
1.14      harris41   50: Execute the following command to create a user named 'www' on your
                     51: LON-CAPA server:
1.13      harris41   52: </p>
1.14      harris41   53: <table bgcolor="#aaaaaa" border="1"><tr><td>
                     54: <tt>/usr/sbin/useradd www</tt>
                     55: </td></tr></table>
1.13      harris41   56: <a name="shadow" />
1.12      harris41   57: <h3>Make a LON-CAPA system work with shadow passwords</h3>
1.14      harris41   58: <table border="1">
1.12      harris41   59: <tr><th>Step #</th><th>Description</th></tr>
                     60: <tr><td>
1.14      harris41   61: <font size="+1">1</font>
1.12      harris41   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>
1.13      harris41   89: <tr><td>
                     90: <font size='+1'>3</font>
                     91: </td><td>
1.17      harris41   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'.
1.13      harris41  123: </p>
1.17      harris41  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:
1.18      harris41  146: </p>
1.17      harris41  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>
1.13      harris41  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>
1.25      harris41  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>
1.26      harris41  166: <br />
1.25      harris41  167: <tt>cd loncapa</tt></td></tr>
                    168: </table>
1.14      harris41  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>
1.13      harris41  176: <a name="checkrpms" />
                    177: <h3>Checking your Linux RPMs</h3>
                    178: <p>
1.14      harris41  179: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
                    180: against an FTP repository.
1.13      harris41  181: </p>
1.14      harris41  182: <table bgcolor="#aaaaaa" border="1">
1.13      harris41  183: <tr><td><tt>./CHECKRPMS</tt></td></tr>
1.12      harris41  184: </table>
1.13      harris41  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.
1.19      harris41  190: <br />Note:
1.12      harris41  191: </p>
1.19      harris41  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>
1.29      harris41  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.
1.27      harris41  198: </li>
1.19      harris41  199: </ul>
1.23      harris41  200: <p>
                    201: The following instructions assume you are logged in as 'root'.
                    202: </p>
1.20      harris41  203: <p>Entering the mysql shell</p>
1.14      harris41  204: <table bgcolor="#aaaaaa" border="1"><tr><td>
1.13      harris41  205: <pre>
                    206: mysql -u root -p mysql
1.19      harris41  207: OR
1.22      harris41  208: mysql -u root mysql (depending on whether you have set a root password)
1.19      harris41  209: </pre>
                    210: </td></tr></table>
1.20      harris41  211: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
1.19      harris41  212: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    213: <pre>
                    214: mysql> CREATE DATABASE loncapa;
1.13      harris41  215: 
1.19      harris41  216: mysql> INSERT INTO user (Host, User, Password)
1.27      harris41  217: mysql> VALUES ('localhost','www',password('localhostkey'));
1.13      harris41  218: 
1.19      harris41  219: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
1.13      harris41  220: 
1.19      harris41  221: mysql> FLUSH PRIVILEGES;
                    222: </pre>
                    223: </td></tr></table>
1.20      harris41  224: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19      harris41  225: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    226: <pre>
1.13      harris41  227: shell> mysql -u root mysql
1.19      harris41  228: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
                    229: </pre>
                    230: </td></tr></table>
1.20      harris41  231: <p>SECURITY: only allow access from localhost</p>
1.19      harris41  232: <table bgcolor="#aaaaaa" border="1"><tr><td>
                    233: <pre>
                    234: shell> mysql -u root -p mysql
1.28      harris41  235: mysql> DELETE FROM user WHERE host&lt;&gt;'localhost';
1.13      harris41  236: </pre>
                    237: </td></tr></table>
1.15      harris41  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>
1.16      harris41  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>
1.12      harris41  256: <!-- maintext end -->
1.18      harris41  257: <!-- validated -->
1.11      harris41  258: </body>
                    259: </html>

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