Annotation of doc/build/install.html, revision 1.20
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.20 ! harris41 4: <!-- $Id: install.html,v 1.19 2002/05/10 16:17:45 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.14 harris41 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>
1.13 harris41 157: <a name="checkrpms" />
158: <h3>Checking your Linux RPMs</h3>
159: <p>
1.14 harris41 160: The <strong>CHECKRPMS</strong> command will check the RPMs on your machine
161: against an FTP repository.
1.13 harris41 162: </p>
1.14 harris41 163: <table bgcolor="#aaaaaa" border="1">
1.13 harris41 164: <tr><td><tt>./CHECKRPMS</tt></td></tr>
1.12 harris41 165: </table>
1.13 harris41 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.
1.19 harris41 171: <br />Note:
1.12 harris41 172: </p>
1.19 harris41 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>
1.20 ! harris41 181: <p>Entering the mysql shell</p>
1.14 harris41 182: <table bgcolor="#aaaaaa" border="1"><tr><td>
1.13 harris41 183: <pre>
184: mysql -u root -p mysql
1.19 harris41 185: OR
186: mysql -u root (depending on whether you have set a root password)
187: </pre>
188: </td></tr></table>
1.20 ! harris41 189: <p>Creating the mysql 'www' user (after entering mysql shell)</p>
1.19 harris41 190: <table bgcolor="#aaaaaa" border="1"><tr><td>
191: <pre>
192: mysql> CREATE DATABASE loncapa;
1.13 harris41 193:
1.19 harris41 194: mysql> INSERT INTO user (Host, User, Password)
195: mysql> VALUES ('localhost','www',password('WWWPASSWORD'));
1.13 harris41 196:
1.19 harris41 197: mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost;
1.13 harris41 198:
1.19 harris41 199: mysql> FLUSH PRIVILEGES;
200: </pre>
201: </td></tr></table>
1.20 ! harris41 202: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19 harris41 203: <table bgcolor="#aaaaaa" border="1"><tr><td>
204: <pre>
205: shell> mysql -u root mysql
206: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
207: </pre>
208: </td></tr></table>
1.20 ! harris41 209: <p>SECURITY: set a password for the mysql 'root' user</p>
1.19 harris41 210: <table bgcolor="#aaaaaa" border="1"><tr><td>
211: <pre>
1.13 harris41 212: shell> mysql -u root mysql
1.19 harris41 213: mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');
214: </pre>
215: </td></tr></table>
1.20 ! harris41 216: <p>SECURITY: only allow access from localhost</p>
1.19 harris41 217: <table bgcolor="#aaaaaa" border="1"><tr><td>
218: <pre>
219: shell> mysql -u root -p mysql
220: mysql> DELETE * FROM user WHERE host<>'localhost';
1.13 harris41 221: </pre>
222: </td></tr></table>
1.15 harris41 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>
1.16 harris41 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>
1.12 harris41 241: <!-- maintext end -->
1.18 harris41 242: <!-- validated -->
1.11 harris41 243: </body>
244: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>