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