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