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