File:
[LON-CAPA] /
doc /
build /
manual_install.frag
Revision
1.8:
download - view:
text,
annotated -
select for diffs
Wed Oct 22 21:32:00 2008 UTC (15 years, 9 months ago) by
raeburn
Branches:
MAIN
CVS tags:
version_2_9_X,
version_2_9_99_0,
version_2_9_1,
version_2_9_0,
version_2_8_X,
version_2_8_99_1,
version_2_8_99_0,
version_2_8_2,
version_2_8_1,
version_2_8_0,
version_2_7_99_1,
version_2_7_99_0,
version_2_12_X,
version_2_11_X,
version_2_11_5_msu,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
bz6209-base,
bz6209,
HEAD,
GCI_3,
GCI_2,
GCI_1,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse,
BZ4492-feature_Support_horizontal_radioresponse,
BZ4492-Support_horizontal_radioresponse
Update CVS location and Contact information.
1: <p>
2: You will need to check all the following things to ensure proper
3: installation of your LON-CAPA system. Be sure to use the <a
4: href="rh73.html">RedHat 7.3</a> or <a href="fedora_install.html">Fedora</a> specific instructions if they apply,
5: as that will be much easier for you.
6: </p>
7: <ul>
8: <li><a href="#download">Downloading LON-CAPA</a></li>
9: <li><a href="#wwwuser">
10: Creating a user 'www'</a></li>
11: <li><a href="#shadow">
12: Make a LON-CAPA system work with shadow passwords</a></li>
13: <li><a href="#install">
14: Installing LON-CAPA files</a></li>
15: <li><a href="#perl">
16: Installing CPAN modules</a></li>
17: <li><a href="#checkrpms">
18: Checking your Linux RPMs</a> (On RedHat)</li>
19: <li><a href="#fixhosts">
20: Fixing <tt>/etc/hosts</tt></a></li>
21: <li><a href="#mysql">
22: Configuring the MySQL database</a></li>
23: <li><a href="#testing">
24: Testing to see if the LON-CAPA server is operational</a></li>
25: </ul>
26:
27: <a name="download" />
28: <h3>Downloading LON-CAPA</h3>
29:
30: <p>
31: <b>Current Release is Version LATESTVERSION.
32: This version was released on LATESTDATE.</b>
33: </p>
34: <p>
35: You can download the <b>most current version of LON-CAPA</b> at
36: <a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz">
37: http://install.lon-capa.org/versions/loncapa-current.tar.gz</a>
38: (version LATESTVERSION).
39: </p>
40: <p>
41: The <b>development release of LON-CAPA</b> is at:
42: <a href="http://install.lon-capa.org/versions/loncapa-unstable.tar.gz">
43: http://install.lon-capa.org/versions/loncapa-unstable.tar.gz</a>.
44: </p>
45: <p>
46: To view the code development history of LON-CAPA, you will need to use the
47: <a href="http://www.cvshome.org/">CVS</a> tool, the open standard for
48: version control. Please contact the MSU LON-CAPA group
49: (<a href="mailto:helpdesk@lon-capa.org">helpdesk@lon-capa.org</a>) to request a
50: CVS USERNAME.
51: </p>
52: <p>
53: The initial CVS commands would be:
54: </p>
55: <blockquote>
56: <table bgcolor="#aaaaaa" border="1">
57: <tr><td>
58: <pre>
59: export CVSROOT=:ext:USERNAME@source.lon-capa.org:/home/cvs
60: cvs login
61: cvs co loncapa
62: </pre>
63: </td></tr></table>
64: </blockquote>
65: <p>
66: For more information on using CVS, please visit
67: <a href="http://www.cvshome.org/">http://www.cvshome.org/</a>
68: or read <tt>loncom/build/readme.html</tt> after downloading
69: the current version of LON-CAPA as described above.
70: </p>
71:
72: <a name="wwwuser" />
73: <h3>Creating a user 'www'</h3>
74: <p>
75: Execute the following command to create a user named 'www' on your
76: LON-CAPA server:
77: </p>
78: <table bgcolor="#aaaaaa" border="1"><tr><td>
79: <tt>/usr/sbin/useradd www</tt>
80: </td></tr></table>
81: <a name="shadow" />
82: <h3>Make a LON-CAPA system work with shadow passwords</h3>
83: <table border="1">
84: <tr><th>Step #</th><th>Description</th></tr>
85: <tr><td>
86: <font size="+1">1</font>
87: </td><td>
88: <p>Is your system using shadow passwords? (Note: LON-CAPA will work
89: with either MD5/non-MD5 configured systems). It is strongly
90: recommended to use shadow passwords. If your system is currently not
91: using shadow passwords, run the "pwconv" command (as root) in order to
92: convert to shadow passwords. If you choose not to use shadow
93: passwords, then do not perform any of the additional steps. If your
94: system is using shadow passwords, then you will need to perform the
95: additional steps below.
96: </p>
97: <p>
98: <strong>How to detect:</strong>
99: <br />command: <tt>cat /etc/passwd | grep ':x:'</tt>
100: </p>
101: <p>If there is output such as "<tt>root:x:0:0:root:/root:/bin/bash</tt>",
102: then your system is using shadow passwords and you will need to continue with
103: the steps below.
104: </p>
105: </td></tr>
106: <tr><td>
107: <font size='+1'>2</font>
108: </td><td>
109: <p><strong>Retrieve the mod_auth_external source</strong> by
110: running the following command
111: </p>
112: <p><tt>
113: wget http://www.unixpapa.com/software/mod_auth_external-2.1.15.tar.gz
114: </tt>
115: </p>
116: </td></tr>
117: <tr><td>
118: <font size='+1'>3</font>
119: </td><td>
120: <p><strong>Unpack the mod_auth_external source</strong> by
121: running the following command
122: </p>
123: <p>
124: <tt>tar xzvf mod_auth_external-2.1.15.tar.gz</tt>
125: </p>
126: </td></tr>
127: <tr><td>
128: <font size='+1'>4</font>
129: </td><td>
130: <p><strong>Go to the <tt>pwauth</tt> directory</strong> by
131: running the following command
132: </p>
133: <p>
134: <tt>cd mod_auth_external-2.1.15/pwauth/</tt>
135: </p>
136: </td></tr>
137: <tr><td>
138: <font size='+1'>5</font>
139: </td><td>
140: <p><strong>Edit <tt>config.h</tt> and change SERVER_UIDS definition</strong>
141: </p>
142: <p>
143: Determine the user id of 'www':
144: <br /><tt>id -u www</tt>
145: <br />
146: Change the line
147: <br /><tt>#define SERVER_UIDS 99 /* user "nobody" */</tt>
148: <br />to be
149: <br /><tt>#define SERVER_UIDS 513 /* user "www" */</tt>
150: <br />where in this example 513 corresponds to the user id of 'www'.
151: </p>
152: </td></tr>
153: <tr><td>
154: <font size='+1'>6</font>
155: </td><td>
156: <p><strong>Compile the <tt>pwauth</tt> executable</strong> by
157: running the following command
158: </p>
159: <p>
160: <tt>make</tt>
161: </p>
162: </td></tr>
163: <tr><td>
164: <font size='+1'>7</font>
165: </td><td>
166: <p><strong>Install <tt>pwauth</tt></strong> by doing the following
167: </p>
168: <p>
169: <tt>cp pwauth /usr/local/sbin/</tt>
170: <br /><tt>chmod 6755 /usr/local/sbin/pwauth</tt>
171: </p>
172: <p>
173: Edit (creating the file) /etc/pam.d/pwauth to have the contents:
174: </p>
175: <pre>
176: auth required /lib/security/pam_pwdb.so shadow nullok
177: auth required /lib/security/pam_nologin.so
178: account required /lib/security/pam_pwdb.so
179: </pre>
180: </td></tr>
181: </table>
182: <a name="install" />
183: <h3>Installing LON-CAPA files</h3>
184: <p>
185: Download the most current
186: <a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz">
187: loncapa-current.tar.gz</a>.
188: </p>
189: <table bgcolor="#aaaaaa" border="1">
190: <tr><td><tt>wget http://install.lon-capa.org/versions/loncapa-current.tar.gz
191: </tt>
192: <br />
193: <tt>tar xzvf loncapa-current.tar.gz</tt>
194: <br />
195: <tt>cd loncapa-N.N</tt> (N.N is the version number)</td></tr>
196: </table>
197: <p>
198: The <strong>UPDATE</strong> command will refresh your filesystem with all
199: the latest LON-CAPA software.
200: </p>
201: <table bgcolor="#aaaaaa" border="1">
202: <tr><td><tt>./UPDATE</tt></td></tr>
203: </table>
204: <a name="perl" />
205: <h3>Installing CPAN modules</h3>
206:
207: <p> Lon-CAPA uses a large numbe of perl modules that need to be
208: installed. Some of these may be available on your machine already,
209: some can be gotten from packages in your Linux Distribution. Some will probably need to come from CPAN </p>
210:
211: <p> You can check which modules you have and which ones you need by
212: running the TEST script. It will generate a CPAN_STATUS_REPORT.
213: You can install an missing perl modules by doing:
214: <table bgcolor="#aaaaaa" border="1">
215: <tr><td><tt>perl -MCPAN -e 'install MODULENAME'</tt></td></tr>
216: </table>
217: Where MODULENAME is the perl module you need to install.
218: </p>
219: <p>
220: More documentation on how CPAN works is available <a href="http://www.perl.com/CPAN/misc/cpan-faq.html#How_install_Perl_modules">here</a>
221: </p>
222:
223: <a name="checkrpms" />
224: <h3>Checking your Linux RPMs on RedHat</h3>
225: <p>
226: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
227: against an FTP repository, if you're using a RedHat server.
228: </p>
229:
230: <table bgcolor="#aaaaaa" border="1">
231: <tr><td><tt>./CHECKRPMS</tt></td></tr>
232: </table>
233:
234: <p>If you are not installing on RedHat, you may need to manually
235: install some software. The following pointers may be useful:</p>
236:
237: <ul><li>LON-CAPA uses a lot of Perl modules. If you are using RedHat,
238: go to <a href="http://install.lon-capa.org/resources">this
239: directory</a> and download the latest
240: <b>LON-CAPA-systemperl-?.?-rh7.i386.rpm</b>, which will contain all
241: the Perl modules you need on RedHat. Use <tt>rpm-Uvh --force</tt> to
242: install the RPM; this will overwrite some currently existing files and
243: that's OK.
244:
245: <br /><br />For other Linux distributions, the easiest way to figure
246: out what Perl modules are being used by LON-CAPA that you do not have
247: installed is to try to start up LON-CAPA and see what Perl complains
248: about missing. Start by trying to run <tt>/home/httpd/perl/lonc</tt>
249: and <tt>/home/httpd/perl/lond</tt> manually as the <tt>www</tt> user,
250: and install the modules it complains about not finding. How you
251: install those modules will be distribution-specific, but failing all
252: else, you can use CPAN; see <tt>man CPAN</tt> on your distribution.<br
253: /><br />Once you've gotten <tt>lonc</tt> and <tt>lond</tt> to run, try
254: starting up the webserver. How long this will take depends entirely on
255: how close your distribution came to having all the modules LON-CAPA
256: uses when you started.</li>
257: <li>LON-CAPA assumes that the apache web server will be named "httpd"
258: and have configuration directories in <tt>/etc/httpd</tt>. Some distributions
259: have that directory at <tt>/etc/apache</tt>. Symlinking <tt>httpd</tt> to the correct
260: directory should work.</li>
261: </ul>
262: <a name="fixhosts" />
263: <h3>Fixing <tt>/etc/hosts</tt></h3>
264: <p>
265: A common RedHat glitch of new installations (RedHat's fault, not LON-CAPA)
266: is the generation of /etc/hosts.
267: </p>
268: <p>
269: It should look something like this (except the <tt>myschool</tt> line
270: should be replaced with settings specific to your machine):
271: </p>
272: <table bgcolor="#aaaaaa" border="1">
273: <tr><td>
274: <pre>
275: 127.0.0.1 localhost.localdomain localhost
276: 12.34.56.78 www.myschool.edu myschool
277: </pre></td></tr>
278: </table>
279: <a name="mysql" />
280: <h3>Configuring the MySQL database</h3>
281: <p>
282: The following commands describe how to configure the MySQL database
283: on your LON-CAPA server.
284: <br />Note:
285: </p>
286: <ul>
287: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
288: (it does not have to be the Linux OS root password)
289: </li>
290: <li>The MySQL www@localhost user must always have a password of 'localhostkey'
291: in order for there to be correct operation of a standard LON-CAPA system.
292: </li>
293: </ul>
294: <p>
295: The following instructions assume you are logged in as 'root'.
296: </p>
297: <p>Entering the mysql shell</p>
298: <table bgcolor="#aaaaaa" border="1"><tr><td>
299: <pre>
300: mysql -u root -p mysql
301: OR
302: mysql -u root mysql (depending on whether you have set a root password)
303: </pre>
304: </td></tr></table>
305: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
306: <table bgcolor="#aaaaaa" border="1"><tr><td>
307: <pre>
308: mysql> CREATE DATABASE loncapa;
309:
310: mysql> INSERT INTO user (Host, User, Password)
311: mysql> VALUES ('localhost','www',password('localhostkey'));
312:
313: mysql> INSERT INTO db VALUES ('localhost','loncapa','www',
314: mysql> 'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
315:
316: mysql> FLUSH PRIVILEGES;
317: </pre>
318: </td></tr></table>
319: <p>SECURITY: set a password for the mysql 'root' user</p>
320: <table bgcolor="#aaaaaa" border="1"><tr><td>
321: <pre>
322: shell> mysql -u root mysql
323: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
324: </pre>
325: </td></tr></table>
326: <p>SECURITY: only allow access from localhost</p>
327: <table bgcolor="#aaaaaa" border="1"><tr><td>
328: <pre>
329: shell> mysql -u root -p mysql
330: mysql> DELETE FROM user WHERE host<>'localhost';
331: </pre>
332: </td></tr></table>
333: <a name="testing" />
334: <h3>Testing to see if the LON-CAPA server is operational</h3>
335: <p>
336: The <strong>TEST</strong> command will check the installation software,
337: the perl libraries on your system, the MySQL database, and
338: will also automatically test the real-time operation of the
339: LON-CAPA Apache web server.
340: </p>
341: <table bgcolor="#aaaaaa" border="1">
342: <tr><td><tt>./TEST</tt></td></tr>
343: </table>
344: <p>
345: Using the <strong>TEST</strong> command will likely
346: be an iterative process.
347: It is normal to expect that the <strong>TEST</strong> command
348: will recommend you perform various steps to ensure optimal
349: performance of your LON-CAPA server.
350: </p>
351: <!-- maintext end -->
352: <!-- validated -->
353: </body>
354: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>