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.19 2002/05/10 16:17:45 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: <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: <br />Note:
172: </p>
173: <ul>
174: <li>you should substitute 'WWWPASSWORD' with the value for 'lonSqlAccess'
175: present inside <tt>/etc/httpd/conf/loncapa.conf</tt> <i>or in access.conf</i>
176: </li>
177: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
178: (it does not have to be the Linux OS root password)
179: </li>
180: </ul>
181: <table bgcolor="#aaaaaa" border="1"><tr><td>
182: <caption>Entering the mysql shell</caption>
183: <pre>
184: mysql -u root -p mysql
185: OR
186: mysql -u root (depending on whether you have set a root password)
187: </pre>
188: </td></tr></table>
189: <table bgcolor="#aaaaaa" border="1"><tr><td>
190: <caption>Creating the mysql 'www' user (after entering mysql shell)</caption>
191: <pre>
192: mysql> CREATE DATABASE loncapa;
193:
194: mysql> INSERT INTO user (Host, User, Password)
195: mysql> VALUES ('localhost','www',password('WWWPASSWORD'));
196:
197: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
198:
199: mysql> FLUSH PRIVILEGES;
200: </pre>
201: </td></tr></table>
202: <table bgcolor="#aaaaaa" border="1"><tr><td>
203: <caption>SECURITY: set a password for the mysql 'root' user</caption>
204: <pre>
205: shell> mysql -u root mysql
206: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
207: </pre>
208: </td></tr></table>
209: <table bgcolor="#aaaaaa" border="1"><tr><td>
210: <caption>SECURITY: set a password for the mysql 'root' user</caption>
211: <pre>
212: shell> mysql -u root mysql
213: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
214: </pre>
215: </td></tr></table>
216: <table bgcolor="#aaaaaa" border="1"><tr><td>
217: <caption>SECURITY: only allow access from localhost</caption>
218: <pre>
219: shell> mysql -u root -p mysql
220: mysql> DELETE * FROM user WHERE host<>'localhost';
221: </pre>
222: </td></tr></table>
223: <a name="testing" />
224: <h3>Testing to see if the LON-CAPA server is operational</h3>
225: <p>
226: The <strong>TEST</strong> command will check the installation software,
227: the perl libraries on your system, the MySQL database, and
228: will also automatically test the real-time operation of the
229: LON-CAPA Apache web server.
230: </p>
231: <table bgcolor="#aaaaaa" border="1">
232: <tr><td><tt>./TEST</tt></td></tr>
233: </table>
234: <p>
235: Using the <strong>TEST</strong> command will likely
236: be an iterative process.
237: It is normal to expect that the <strong>TEST</strong> command
238: will recommend you perform various steps to ensure optimal
239: performance of your LON-CAPA server.
240: </p>
241: <!-- maintext end -->
242: <!-- validated -->
243: </body>
244: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>