Annotation of doc/build/install.html, revision 1.26
1.18 harris41 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.11 harris41 3: <!-- The LearningOnline Network with CAPA -->
1.26 ! harris41 4: <!-- $Id: install.html,v 1.25 2002/06/02 03:50:40 harris41 Exp $ -->
1.11 harris41 5: <html>
6: <head>
1.18 harris41 7: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
1.11 harris41 8: <title>LON-CAPA Installation</title>
1.12 harris41 9: <!-- pdfahref install.pdf -->
10: <!-- button INSTALL -->
1.11 harris41 11: </head>
1.12 harris41 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.
1.18 harris41 18: </p>
1.12 harris41 19: <ul>
1.13 harris41 20: <li><a href="#wwwuser">
21: Creating a user 'www'</a></li>
22: <li><a href="#shadow">
1.12 harris41 23: Make a LON-CAPA system work with shadow passwords</a></li>
1.13 harris41 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>
1.15 harris41 30: <li><a href="#testing">
31: Testing to see if the LON-CAPA server is operational</a></li>
1.12 harris41 32: </ul>
33: <br />
34: <!-- preamble end -->
35: <!-- maintext start -->
1.13 harris41 36: <a name="wwwuser" />
37: <h3>Creating a user 'www'</h3>
38: <p>
1.14 harris41 39: Execute the following command to create a user named 'www' on your
40: LON-CAPA server:
1.13 harris41 41: </p>
1.14 harris41 42: <table bgcolor="#aaaaaa" border="1"><tr><td>
43: <tt>/usr/sbin/useradd www</tt>
44: </td></tr></table>
1.13 harris41 45: <a name="shadow" />
1.12 harris41 46: <h3>Make a LON-CAPA system work with shadow passwords</h3>
1.14 harris41 47: <table border="1">
1.12 harris41 48: <tr><th>Step #</th><th>Description</th></tr>
49: <tr><td>
1.14 harris41 50: <font size="+1">1</font>
1.12 harris41 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>
1.13 harris41 78: <tr><td>
79: <font size='+1'>3</font>
80: </td><td>
1.17 harris41 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'.
1.13 harris41 112: </p>
1.17 harris41 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:
1.18 harris41 135: </p>
1.17 harris41 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>
1.13 harris41 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>
1.25 harris41 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>
1.26 ! harris41 155: <br />
1.25 harris41 156: <tt>cd loncapa</tt></td></tr>
157: </table>
1.14 harris41 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>
1.13 harris41 165: <a name="checkrpms" />
166: <h3>Checking your Linux RPMs</h3>
167: <p>
1.14 harris41 168: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
169: against an FTP repository.
1.13 harris41 170: </p>
1.14 harris41 171: <table bgcolor="#aaaaaa" border="1">
1.13 harris41 172: <tr><td><tt>./CHECKRPMS</tt></td></tr>
1.12 harris41 173: </table>
1.13 harris41 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.
1.19 harris41 179: <br />Note:
1.12 harris41 180: </p>
1.19 harris41 181: <ul>
182: <li>you should substitute 'WWWPASSWORD' with the value for 'lonSqlAccess'
183: present inside <tt>/etc/httpd/conf/loncapa.conf</tt> <i>or in access.conf</i>
184: </li>
185: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
186: (it does not have to be the Linux OS root password)
187: </li>
188: </ul>
1.23 harris41 189: <p>
190: The following instructions assume you are logged in as 'root'.
191: </p>
1.20 harris41 192: <p>Entering the mysql shell</p>
1.14 harris41 193: <table bgcolor="#aaaaaa" border="1"><tr><td>
1.13 harris41 194: <pre>
195: mysql -u root -p mysql
1.19 harris41 196: OR
1.22 harris41 197: mysql -u root mysql (depending on whether you have set a root password)
1.19 harris41 198: </pre>
199: </td></tr></table>
1.20 harris41 200: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
1.19 harris41 201: <table bgcolor="#aaaaaa" border="1"><tr><td>
202: <pre>
203: mysql> CREATE DATABASE loncapa;
1.13 harris41 204:
1.19 harris41 205: mysql> INSERT INTO user (Host, User, Password)
206: mysql> VALUES ('localhost','www',password('WWWPASSWORD'));
1.13 harris41 207:
1.19 harris41 208: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
1.13 harris41 209:
1.19 harris41 210: mysql> FLUSH PRIVILEGES;
211: </pre>
212: </td></tr></table>
1.20 harris41 213: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19 harris41 214: <table bgcolor="#aaaaaa" border="1"><tr><td>
215: <pre>
1.13 harris41 216: shell> mysql -u root mysql
1.19 harris41 217: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
218: </pre>
219: </td></tr></table>
1.20 harris41 220: <p>SECURITY: only allow access from localhost</p>
1.19 harris41 221: <table bgcolor="#aaaaaa" border="1"><tr><td>
222: <pre>
223: shell> mysql -u root -p mysql
1.24 harris41 224: mysql> DELETE FROM user WHERE host<>'localhost';
1.13 harris41 225: </pre>
226: </td></tr></table>
1.15 harris41 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>
1.16 harris41 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>
1.12 harris41 245: <!-- maintext end -->
1.18 harris41 246: <!-- validated -->
1.11 harris41 247: </body>
248: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>