File:
[LON-CAPA] /
doc /
build /
Attic /
install.html
Revision
1.36:
download - view:
text,
annotated -
select for diffs
Sat Nov 16 00:57:28 2002 UTC (21 years, 9 months ago) by
harris41
Branches:
MAIN
CVS tags:
HEAD
bug workaround for mysql version 3.23 (49-51) which includes
RH7.3 and RH8.0.
()*@#&$Q_)(@#*$(&_)#(@*$_)@#*($_*$@#&%_{)@#$(_#()@$*%)$(*#&)@#*$_
@#$)(*@_)$(*@#_)($*@#%_)(*@#$_)(*@#_$)(*@#$_)(@*$_)(@#*$_)(@#*$_)@#(
)*(#)&_+)&*#^#@$&((_#$_)(#@$*
ARGGGH!!!!!!!!!!!!!!
BAHHHH!!!!
YAH YAH YAH KAWABUNGAH!!!!!!!!!!!
AHHHHHHHHHHHHHHH
AHHHHHHHHHHHHHHH
AHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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.36 2002/11/16 00:57:28 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="#mysql">
29: Configuring the MySQL database</a></li>
30: <li><a href="#testing">
31: Testing to see if the LON-CAPA server is operational</a></li>
32: </ul>
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: <br />
40: <!-- preamble end -->
41: <!-- maintext start -->
42: <a name="wwwuser" />
43: <h3>Creating a user 'www'</h3>
44: <p>
45: Execute the following command to create a user named 'www' on your
46: LON-CAPA server:
47: </p>
48: <table bgcolor="#aaaaaa" border="1"><tr><td>
49: <tt>/usr/sbin/useradd www</tt>
50: </td></tr></table>
51: <a name="shadow" />
52: <h3>Make a LON-CAPA system work with shadow passwords</h3>
53: <table border="1">
54: <tr><th>Step #</th><th>Description</th></tr>
55: <tr><td>
56: <font size="+1">1</font>
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>
84: <tr><td>
85: <font size='+1'>3</font>
86: </td><td>
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'.
118: </p>
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:
141: </p>
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>
147: </td></tr>
148: </table>
149: <a name="install" />
150: <h3>Installing LON-CAPA files</h3>
151: <p>
152: Download the most current
153: <a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz">
154: loncapa-current.tar.gz</a>.
155: </p>
156: <table bgcolor="#aaaaaa" border="1">
157: <tr><td><tt>wget http://install.lon-capa.org/versions/loncapa-current.tar.gz
158: </tt>
159: <br />
160: <tt>tar xzvf loncapa-current.tar.gz</tt>
161: <br />
162: <tt>cd loncapa-N.N</tt> (N.N is the version number)</td></tr>
163: </table>
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>
171: <a name="checkrpms" />
172: <h3>Checking your Linux RPMs</h3>
173: <p>
174: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
175: against an FTP repository.
176: </p>
177: <table bgcolor="#aaaaaa" border="1">
178: <tr><td><tt>./CHECKRPMS</tt></td></tr>
179: </table>
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.
185: <br />Note:
186: </p>
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>
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.
193: </li>
194: </ul>
195: <p>
196: The following instructions assume you are logged in as 'root'.
197: </p>
198: <p>Entering the mysql shell</p>
199: <table bgcolor="#aaaaaa" border="1"><tr><td>
200: <pre>
201: mysql -u root -p mysql
202: OR
203: mysql -u root mysql (depending on whether you have set a root password)
204: </pre>
205: </td></tr></table>
206: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
207: <table bgcolor="#aaaaaa" border="1"><tr><td>
208: <pre>
209: mysql> CREATE DATABASE loncapa;
210:
211: mysql> INSERT INTO user (Host, User, Password)
212: mysql> VALUES ('localhost','www',password('localhostkey'));
213:
214: mysql> INSERT INTO db VALUES ('localhost','loncapa','www',
215: mysql> 'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
216:
217: mysql> FLUSH PRIVILEGES;
218: </pre>
219: </td></tr></table>
220: <p>SECURITY: set a password for the mysql 'root' user</p>
221: <table bgcolor="#aaaaaa" border="1"><tr><td>
222: <pre>
223: shell> mysql -u root mysql
224: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
225: </pre>
226: </td></tr></table>
227: <p>SECURITY: only allow access from localhost</p>
228: <table bgcolor="#aaaaaa" border="1"><tr><td>
229: <pre>
230: shell> mysql -u root -p mysql
231: mysql> DELETE FROM user WHERE host<>'localhost';
232: </pre>
233: </td></tr></table>
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>
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>
252: <!-- maintext end -->
253: <!-- validated -->
254: </body>
255: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>