Annotation of doc/build/install.html, revision 1.25
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.25 ! harris41 4: <!-- $Id: install.html,v 1.24 2002/05/10 20:51:20 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>
! 155: <tt>cd loncapa</tt></td></tr>
! 156: </table>
1.14 harris41 157: <p>
158: The <strong>UPDATE</strong> command will refresh your filesystem with all
159: the latest LON-CAPA software.
160: </p>
161: <table bgcolor="#aaaaaa" border="1">
162: <tr><td><tt>./UPDATE</tt></td></tr>
163: </table>
1.13 harris41 164: <a name="checkrpms" />
165: <h3>Checking your Linux RPMs</h3>
166: <p>
1.14 harris41 167: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
168: against an FTP repository.
1.13 harris41 169: </p>
1.14 harris41 170: <table bgcolor="#aaaaaa" border="1">
1.13 harris41 171: <tr><td><tt>./CHECKRPMS</tt></td></tr>
1.12 harris41 172: </table>
1.13 harris41 173: <a name="mysql" />
174: <h3>Configuring the MySQL database</h3>
175: <p>
176: The following commands describe how to configure the MySQL database
177: on your LON-CAPA server.
1.19 harris41 178: <br />Note:
1.12 harris41 179: </p>
1.19 harris41 180: <ul>
181: <li>you should substitute 'WWWPASSWORD' with the value for 'lonSqlAccess'
182: present inside <tt>/etc/httpd/conf/loncapa.conf</tt> <i>or in access.conf</i>
183: </li>
184: <li>you should substitute 'ROOTPASSWORD' with something very hard to guess
185: (it does not have to be the Linux OS root password)
186: </li>
187: </ul>
1.23 harris41 188: <p>
189: The following instructions assume you are logged in as 'root'.
190: </p>
1.20 harris41 191: <p>Entering the mysql shell</p>
1.14 harris41 192: <table bgcolor="#aaaaaa" border="1"><tr><td>
1.13 harris41 193: <pre>
194: mysql -u root -p mysql
1.19 harris41 195: OR
1.22 harris41 196: mysql -u root mysql (depending on whether you have set a root password)
1.19 harris41 197: </pre>
198: </td></tr></table>
1.20 harris41 199: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
1.19 harris41 200: <table bgcolor="#aaaaaa" border="1"><tr><td>
201: <pre>
202: mysql> CREATE DATABASE loncapa;
1.13 harris41 203:
1.19 harris41 204: mysql> INSERT INTO user (Host, User, Password)
205: mysql> VALUES ('localhost','www',password('WWWPASSWORD'));
1.13 harris41 206:
1.19 harris41 207: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
1.13 harris41 208:
1.19 harris41 209: mysql> FLUSH PRIVILEGES;
210: </pre>
211: </td></tr></table>
1.20 harris41 212: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19 harris41 213: <table bgcolor="#aaaaaa" border="1"><tr><td>
214: <pre>
1.13 harris41 215: shell> mysql -u root mysql
1.19 harris41 216: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
217: </pre>
218: </td></tr></table>
1.20 harris41 219: <p>SECURITY: only allow access from localhost</p>
1.19 harris41 220: <table bgcolor="#aaaaaa" border="1"><tr><td>
221: <pre>
222: shell> mysql -u root -p mysql
1.24 harris41 223: mysql> DELETE FROM user WHERE host<>'localhost';
1.13 harris41 224: </pre>
225: </td></tr></table>
1.15 harris41 226: <a name="testing" />
227: <h3>Testing to see if the LON-CAPA server is operational</h3>
228: <p>
229: The <strong>TEST</strong> command will check the installation software,
230: the perl libraries on your system, the MySQL database, and
231: will also automatically test the real-time operation of the
232: LON-CAPA Apache web server.
233: </p>
234: <table bgcolor="#aaaaaa" border="1">
235: <tr><td><tt>./TEST</tt></td></tr>
236: </table>
1.16 harris41 237: <p>
238: Using the <strong>TEST</strong> command will likely
239: be an iterative process.
240: It is normal to expect that the <strong>TEST</strong> command
241: will recommend you perform various steps to ensure optimal
242: performance of your LON-CAPA server.
243: </p>
1.12 harris41 244: <!-- maintext end -->
1.18 harris41 245: <!-- validated -->
1.11 harris41 246: </body>
247: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>