1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2: "http://www.w3.org/TR/html4/loose.dtd">
3: <!-- The LearningOnline Network with CAPA -->
4: <!-- $Id: install.html,v 1.17 2002/04/26 13:17:51 harris41 Exp $ -->
5: <html>
6: <head>
7: <title>LON-CAPA Installation</title>
8: <!-- pdfahref install.pdf -->
9: <!-- button INSTALL -->
10: </head>
11: <body bgcolor='#ffffff'>
12: <!-- preamble start -->
13: <br />
14: <p>
15: You will need to check all the following things to ensure proper
16: installation of your LON-CAPA system.
17: <ul>
18: <li><a href="#wwwuser">
19: Creating a user 'www'</a></li>
20: <li><a href="#shadow">
21: Make a LON-CAPA system work with shadow passwords</a></li>
22: <li><a href="#install">
23: Installing LON-CAPA files</a></li>
24: <li><a href="#checkrpms">
25: Checking your Linux RPMs</a></li>
26: <li><a href="#mysql">
27: Configuring the MySQL database</a></li>
28: <li><a href="#testing">
29: Testing to see if the LON-CAPA server is operational</a></li>
30: </ul>
31: <br />
32: <!-- preamble end -->
33: <!-- maintext start -->
34: <a name="wwwuser" />
35: <h3>Creating a user 'www'</h3>
36: <p>
37: Execute the following command to create a user named 'www' on your
38: LON-CAPA server:
39: </p>
40: <table bgcolor="#aaaaaa" border="1"><tr><td>
41: <tt>/usr/sbin/useradd www</tt>
42: </td></tr></table>
43: <a name="shadow" />
44: <h3>Make a LON-CAPA system work with shadow passwords</h3>
45: <p>
46: <table border="1">
47: <tr><th>Step #</th><th>Description</th></tr>
48: <tr><td>
49: <font size="+1">1</font>
50: </td><td>
51: <p>Is your system using shadow passwords? (Note: LON-CAPA will
52: work with either MD5/non-MD5 configured systems). If your
53: system is not using shadow passwords, then do not perform
54: any of the additional steps. If your system is using shadow
55: passwords, then you will need to perform the additional steps below.
56: </p>
57: <p>
58: <strong>How to detect:</strong>
59: <br />command: <tt>cat /etc/passwd | grep ':x:'</tt>
60: </p>
61: <p>If there is output such as "<tt>root:x:0:0:root:/root:/bin/bash</tt>",
62: then your system is using shadow passwords and you will need to continue with
63: the steps below.
64: </p>
65: </td></tr>
66: <tr><td>
67: <font size='+1'>2</font>
68: </td><td>
69: <p><strong>Retrieve the mod_auth_external source</strong> by
70: running the following command
71: </p>
72: <p><tt>
73: wget http://www.wwnet.net/~janc/software/mod_auth_external-2.1.13.tar.gz
74: </tt>
75: </p>
76: </td></tr>
77: <tr><td>
78: <font size='+1'>3</font>
79: </td><td>
80: <p><strong>Unpack the mod_auth_external source</strong> by
81: running the following command
82: </p>
83: <p>
84: <tt>tar xzvf mod_auth_external-2.1.13.tar.gz</tt>
85: </p>
86: </td></tr>
87: <tr><td>
88: <font size='+1'>4</font>
89: </td><td>
90: <p><strong>Go to the <tt>pwauth</tt> directory</strong> by
91: running the following command
92: </p>
93: <p>
94: <tt>cd mod_auth_external-2.1.13/pwauth/</tt>
95: </p>
96: </td></tr>
97: <tr><td>
98: <font size='+1'>5</font>
99: </td><td>
100: <p><strong>Edit <tt>config.h</tt> and change SERVER_UIDS definition</strong>
101: </p>
102: <p>
103: Determine the user id of 'www':
104: <br /><tt>grep ^www /etc/passwd | cut -d':' -f3</tt>
105: <br />
106: Change the line
107: <br /><tt>#define SERVER_UIDS 99 /* user "nobody" */</tt>
108: <br />to be
109: <br /><tt>#define SERVER_UIDS 513 /* user "www" */</tt>
110: <br />where in this example 513 corresponds to the user id of 'www'.
111: </p>
112: </td></tr>
113: <tr><td>
114: <font size='+1'>6</font>
115: </td><td>
116: <p><strong>Compile the <tt>pwauth</tt> executable</strong> by
117: running the following command
118: </p>
119: <p>
120: <tt>make</tt>
121: </p>
122: </td></tr>
123: <tr><td>
124: <font size='+1'>7</font>
125: </td><td>
126: <p><strong>Install <tt>pwauth</tt></strong> by doing the following
127: </p>
128: <p>
129: <tt>cp pwauth /usr/local/sbin/</tt>
130: <br /><tt>chmod 6755 /usr/local/sbin/pwauth</tt>
131: </p>
132: <p>
133: Edit (creating the file) /etc/pam.d/pwauth to have the contents:
134: <pre>
135: auth required /lib/security/pam_pwdb.so shadow nullok
136: auth required /lib/security/pam_nologin.so
137: account required /lib/security/pam_pwdb.so
138: </pre>
139: </p>
140: </td></tr>
141: </table>
142: </p>
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: <p>
151: The <strong>UPDATE</strong> command will refresh your filesystem with all
152: the latest LON-CAPA software.
153: </p>
154: <table bgcolor="#aaaaaa" border="1">
155: <tr><td><tt>./UPDATE</tt></td></tr>
156: </table>
157: <a name="checkrpms" />
158: <h3>Checking your Linux RPMs</h3>
159: <p>
160: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
161: against an FTP repository.
162: </p>
163: <table bgcolor="#aaaaaa" border="1">
164: <tr><td><tt>./CHECKRPMS</tt></td></tr>
165: </table>
166: <a name="mysql" />
167: <h3>Configuring the MySQL database</h3>
168: <p>
169: The following commands describe how to configure the MySQL database
170: on your LON-CAPA server.
171: </p>
172: <table bgcolor="#aaaaaa" border="1"><tr><td>
173: <pre>
174: Enter the mysql shell---
175: mysql -u root -p mysql
176:
177: Run these commands---
178: CREATE DATABASE loncapa;
179:
180: INSERT INTO user (Host, User, Password)
181: VALUES ('localhost','www',password('SOMEPASSWORD'));
182:
183: GRANT ALL PRIVILEGES ON *.* TO www@localhost;
184:
185: FLUSH PRIVILEGES;
186:
187: shell> mysql -u root mysql
188: mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
189: </pre>
190: </td></tr></table>
191: <a name="testing" />
192: <h3>Testing to see if the LON-CAPA server is operational</h3>
193: <p>
194: The <strong>TEST</strong> command will check the installation software,
195: the perl libraries on your system, the MySQL database, and
196: will also automatically test the real-time operation of the
197: LON-CAPA Apache web server.
198: </p>
199: <table bgcolor="#aaaaaa" border="1">
200: <tr><td><tt>./TEST</tt></td></tr>
201: </table>
202: <p>
203: Using the <strong>TEST</strong> command will likely
204: be an iterative process.
205: It is normal to expect that the <strong>TEST</strong> command
206: will recommend you perform various steps to ensure optimal
207: performance of your LON-CAPA server.
208: </p>
209: <!-- maintext end -->
210: </body>
211: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>