Annotation of doc/build/RHEL8_install.frag, revision 1.4
1.1 raeburn 1: <h1>Installing LON-CAPA on a minimal Red Hat Enterprise Linux 8 System</h1>
2: <p>
3: This document guides you through the process of setting up a new LON-CAPA
4: server or virtual machine running Red Hat Enterprise Linux 8 with a minimum of packages installed.
5: The server or virtual machine will be configured solely as a LON-CAPA server and will be
6: expected to have no other services running. Your server or virtual machine is expected to have
7: a fast connection to the internet.
8: </p><p>
9: More information is available at
10: <a href="http://install.lon-capa.org/">http://install.lon-capa.org/</a>.
11: </p>
12:
13: <h2>Before you begin</h2>
14: <p>
15: Installing Linux is straightforward.
16: You will be required to log in to the machine and execute
17: some routine Unix commands. Familiarity with the Apache web server, mod_perl,
18: perl, and MySQL are not required to install and run LON-CAPA.
19: </p>
20:
21: <h2>Installation Overview</h2>
22: <p>
23: The installation process takes the following steps:
24: </p>
25: <ol>
26: <li><a href="#obt">Obtain Red Hat Enterprise Linux 8 installation iso file or media</a></li>
27: <li><a href="#net">Determine Network Settings</a></li>
28: <li><a href="#lin">Install Red Hat Enterprise Linux 8</a></li>
29: <li><a href="#upd">Update your system</a></li>
30: <li><a href="#ilc">Install LON-CAPA</a></li>
31: <li><a href="#cdc">Create a Domain Coordinator</a></li>
32: <li><a href="#sts">Start/Restart services</a></li>
33: <li><a href="#log">Log in to LON-CAPA</a></li>
34: </ol>
35:
36: <hr>
37: <h2>1. <a id="obt">Obtain Red Hat Enterprise Linux 8</a></h2>
38: <p>
39: RHEL8 downloads are available from Red Hat:
40: <a href="http://redhat.com/">http://redhat.com/</a>.
41: Either download the Boot ISO or the RHEL 8 binary DVD ISO
42: </p>
43:
44: <h2>2. <a id="net">Determine Network Settings</a></h2>
45: <p>
46: You will need to know the following network settings for your installation.
47: <b>Note:</b>You must have a static IP address to use LON-CAPA.
48: DHCP is <em>not</em> supported.
49:
50: <ul>
51: <li>ip address </li>
52: <li>netmask </li>
53: <li>hostname </li>
54: <li>gateway </li>
55: <li>domain name server(s) </li>
56: </ul>
57:
58: <h2>3. <a id="lin">Minimal Red Hat Enterprise Linux 8 Install</a></h2>
59: <p>
60: Installing Red Hat Enterprise Linux is straightforward.
61: Documentation is available from
62: <a href="https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/">
63: https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/</a>
64: Most of the installation screens are self explanatory.
65: There are a few steps that require comment and are dealt with below.
66: </p>
67: <dl style="list-style:square outside none">
68: <dt>Installation Language</dt>
69: <dd>Use English as your installation language.</dd>
70: <dt>Installation Destination</dt>
71: <dd>For a fresh install may want to use the automatic partitioning feature of the installer.
72: If you want to customize partitioning check the "I will configure partitioning" radio button.
73: LON-CAPA resource files are stored in the /home directory, so the
74: majority of the disk space should be allocated here. If you have 20 GB
75: of space for RHEL, /home should receive at least 10 to 12 GB.
76: Since Mariadb uses the /var filesystem to store its databases you should
77: have at least 4 GB of space available on /var. Be sure to
78: include adequate swap space. A minimum is 512 MB, but you should
79: typically have 1 or 2x as much swap space as you do physical RAM.</dd>
80: <dt>Network and Hostname</dt>
81: <dd>LON-CAPA will <b>not</b> work with a machine set up to use a dynamic
82: IP address. When configuring your network card, be sure to unselect
83: the DHCP option and enter your network information. Enter your hostname</dd>
84: <dt>Software Selection</dt>
85: <dd>Check the "Minimal Install" radio button in the "Base Environment" panel,
86: and check the "Standard" checkbox in the "Add-Ons for Selected Environment" panel.</dd>
87: </dl>
88: <p>
89: Finish installing your server, reboot it, and log in as root.
90: </p>
91: <h3>Firewall Configuration</h3>
92: <p>
1.2 raeburn 93: LON-CAPA can use Firewalld, available by default for RHEL 8. Enable access to standard
1.1 raeburn 94: web server ports (i.e., http and https):
95: </p>
96: <pre>
97: systemctl enable firewalld
98: systemctl start firewalld
1.3 raeburn 99: firewall-cmd --zone=public --permanent --add-service=http
100: firewall-cmd --zone=public --permanent --add-service=https
101: firewall-cmd --reload
1.1 raeburn 102: </pre>
103:
104: <h2>4. <a id="upd">Update your system</a></h2>
105: <p>
106: You will need a Red Hat subscription in order to have access to Red Hat updates.
107: Your institution may have a Red Hat site license, and may maintain a Red Hat Satellite
108: service which can be used to access updates. If not, you can obtain a free 30-day
109: evaluation license from Red Hat. Once that has expired you will need to purchase a
110: subscription. You can use the following comand to register your server/VM with the
111: Red Hat account you created:
112: </p>
113: <pre>
114: subscription-manager register
115: </pre>
116: <p>
117: Once you have registered your server/VM you can than associate entitlements available
118: from your subscription with your server/VM. The following command will show which
119: repositories are enabled:
120: <pre>
121: dnf repolist enabled
122: </pre>
123: <p>
124: You will need the "rhel-8-for-x86_64-appstream-rpms" and "rhel-8-for-x86_64-baseos-rpms"
125: repos enabled. If neither are enabled, enable them using:
126: </p>
127: <pre>
128: subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms
129: subscription-manager repos --enable rhel-8-for-x86_64-baseos-rpms
130: </pre>
131: <p>
132: Update your system to the latest versions of the system software using dnf.
133: </p>
134: <pre>
135: dnf update
136: </pre>
137: <p>
138: If the kernel was updated, reboot your system before continuing with the installation.
139: </p>
140:
141: <h3>Set up access to package repositories</h3>
142: <p>
143: Enable access to the EPEL repository
144: </p>
145: <pre>
146: dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
147: </pre>
148: <p>
149: Enable the "codeready-builder-for-rhel-8-x86_64-rpms" repository.
150: </p>
151: <pre>
152: subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
153: </pre>
154: <p>
155: Install the loncapa.repo file from the LON-CAPA install site:
156: </p>
157: <pre>
158: wget -O /etc/yum.repos.d/loncapa.repo http://install.loncapa.org/versions/redhat/8/loncapa.repo
159: </pre>
160: <p>
161: Verify the required repositories are enabled
162: </p>
163: <pre>
164: dnf repolist enabled
165: </pre>
166: <p>
167: The list of enabled repos should be as follows:
168: </p>
169: <table style="border: 0px; border-collapse: collapse;">
170: <tr><th>repo id</th><th>repo name</th></tr>
171: <tr><td>rhel-8-for-x86_64-appstream-rpms</td><td>Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)</td></tr>
172: <tr><td>rhel-8-for-x86_64-baseos-rpms</td><td>Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)</td></tr>
173: <tr><td>codeready-builder-for-rhel-8-x86_64-rpms</td><td>Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)</td></tr>
174: <tr><td>*epel</td><td>Extra Packages for Enterprise Linux 8 - x86_6</td></tr>
1.2 raeburn 175: <tr><td>loncapa-updates-basearch</td><td>RHEL 8 LON-CAPA x86_64 Updates</td></tr>
176: <tr><td>loncapa-updates-noarch</td><td>RHEL 8 LON-CAPA noarch Updates</td></tr>
1.1 raeburn 177: </table>
178:
179: <h3>Install and enable a Mail Transfer Agent (MTA), e.g., postfix</h3>
180: <pre>
181: dnf install postfix
182: systemctl enable postfix
183: systemctl start postfix
184: </pre>
185:
186: <h3>Configure SELinux</h3>
187: <p>
188: The default RHEL8 installation includes SELinux enabled. Until such time as an SELinux security policy has been created for LON-CAPA, SELinux should be disabled.
189: Retrieve the loncapa_selinux_config file from the LON-CAPA install site:
190: </p>
191: <pre>
192: wget http://install.loncapa.org/versions/redhat/8/loncapa_selinux_config
193: </pre>
194: <p>
195: Install the selinux config file
196: </p>
197: <pre>
198: mv /etc/selinux/config /etc/selinux/config.backup
199: mv loncapa_selinux_config /etc/selinux/config
200: reboot
201: </pre>
202:
203: <h2>5. <a id="ilc">Installing LON-CAPA</a></h2>
204: <h3>Install prerequisites</h3>
205: <p> Execute: </p>
206: <pre>
207: yum install LONCAPA-prerequisites
208: </pre><p>
209: This may take some minutes due to LON-CAPA's large number of dependencies.
210: </p>
211: <h3>Retrieve and execute LON-CAPA setup program</h3>
212: <p>
213: Retrieve the LON-CAPA setup with the following command:
214: </p>
215: <pre>
216: wget http://install.loncapa.org/linux/install.tar
217: </pre>
218: <p>
219: Extract the archive with the following command:
220: </p>
221: <pre>
222: tar xf install.tar
223: </pre>
224: <p>
225: This creates a directory named <tt>installation</tt>. Change to it and
226: execute the setup script with the following commands:
227: </p>
228: <pre>
229: cd installation
230: ./install.pl
231: </pre>
232: <p>
233: The script is used to prepare a Linux system to run LON-CAPA, and can also be
234: used to check the configuration of a system on which LON-CAPA has already been installed. Typically, though, you will run this script only once, when you first install LON-CAPA.
235: </p>
236: <p>
237: The script will analyze your system to determine which actions are recommended. The script will then prompt you to choose the actions you would like taken.
238: Once a choice has been entered for all nine possible actions, required changes will be made.
239: </p>
240: <p>The possible actions are:</p>
241: <ul>
242: <li>Create the www user/group</li>
243: <li>Install the package LON-CAPA uses to authenticate users.</li>
244: <li>Set-up the MySQL (Mariadb) database</li>
245: <li>Set-up MySQL (Mariadb) permissions</li>
246: <li>Configure Apache web server</li>
247: <li>Configure start-up of services</li>
248: <li>Check firewall settings</li>
249: <li>Stop services not used by LON-CAPA, e.g., services for a print server: cups daemon</li>
250: <li>Download LON-CAPA source code in readiness for installation</li>
251: </ul>
252: <h3>Determine LON-CAPA Settings</h3>
253: <p>
254: LON-CAPA requires a number of identifying parameters to be set in order
255: for it to function at all. Below is a list with descriptions.
256: </p>
257: <dl>
258: <dt>Host Type (library or access)</dt>
259: <dd>The server must be designated a 'library' or an 'access' server. In
260: general you should have a library server for your instructors to create
261: their course content on and run their courses. Students should connect
262: to access servers. If you are doing the first install of LON-CAPA at
263: your site, or if you are playing with it for your own edification you
264: should make your machine a 'library' server.</dd>
265: <dt>LON-CAPA domain</dt>
266: <dd>Each site or school which installs LON-CAPA needs its own domain.
267: Here at MSU we use 'msu'. You should choose something short but
268: meaningful. <i>Restriction: One word, no hyphens, underscores, or
269: special characters.</i><br>Domain names which include a departmental
270: abbreviation are not recommended as although LON-CAPA may start in
271: a single department, other departments frequently join subsequently.
272: For a domain name: 'msu' is a superior choice to 'msuphys' for example.
273: </dd>
274: <dt>LON-CAPA host id</dt>
275: <dd>Each LON-CAPA server requires a unique internal name. We use names
276: such as "msul1" for the first library server. <i>Restriction: One word,
277: no hyphens, underscores, or special characters.</i>
278: </dd>
279: <dt>Domain's Primary Library Server ID</dt>
280: <dd>If you are setting up a domain with a single library server, then the domain's primary library server ID will be the LON-CAPA host id of that server (e.g., msul1). Once your domain grows and you need to add more servers, one of the library servers in the domain should be assigned as the domain's primary library server. This will be where domain-wide settings will be stored.<dd>
281: <dt>Host administrator email</dt>
282: <dd>The amount of email sent to this address is relatively minimal. Messages
283: are sent every time the system starts up, or if the system is in
284: serious trouble. On a laptop, make this <tt>root@localhost</tt>.
285: </dd>
286: <dt>Support email address</dt>
287: <dd>Enter an e-mail address here, so users of the system
288: will be able to click an "Ask Helpdesk" link in the system to
289: display a web form which they will complete to request support from
290: your institution's helpdesk. On form submission the contents
291: will be sent to the e-mail address you specify.
292: </dd>
293: </dl>
294:
295: <h3>Configuring LON-CAPA</h3>
296: <p>
297: To configure and install LON-CAPA, execute the following commands:
298: </p>
299: <pre>
300: cd /root/loncapa-X.Y.Z (X.Y.Z should correspond to a version number like '2.11.3')
301: ./UPDATE
302: </pre>
303: <p>
304: You will need to enter the LON-CAPA configuration information you determined
305: in the previous section.
306: </p>
307:
308: <h2>6. <a id="cdc">Creating a Domain Coordinator</a></h2>
309: <p>
310: You will need at least one user at your site who has the role of
311: 'domain coordinator'. This user creates accounts for other users and
312: grants them additional privileges. The make_domain_coordinator.pl script
313: invoked below requires that you enter the user's password.
314: Feel free to use the "passwd username" command to change it later.
315: Replace USERNAME and DOMAIN with an appropriate user name and your domain.
316: If installing a library server and an access server on separate machines or VMs
317: you need only run make_domain_coordinator.pl on the library server.
318: </p>
319: <pre>
320: cd /root/loncapa-X.Y.Z/loncom/build
321: perl make_domain_coordinator.pl USERNAME DOMAIN
322: </pre>
323:
324: <h2>7. <a id="sts">Start/Restart Services</a></h2>
325: <p>
326: The LON-CAPA network services take a moment to start. Most misconfigurations
327: will be apparent at this step.
328: </p>
329: <pre>
1.4 ! raeburn 330: /home/httpd/perl/loncontrol start
1.1 raeburn 331: systemctl start httpd
332: </pre>
333: <p>
334: If you receive warnings about missing perl modules, when starting the httpd service
335: please make sure that the LONCAPA-prerequisites rpm is installed using this command:
336: </p>
337: <pre>
338: rpm -q LONCAPA-prerequisites rpm
339: </pre>
340: <p>
341: If it is not installed, ensure that the required Linux repositories are enabled (see
342: the "Set up access to package repositories" section above), then install it:
343: </p>
344: <pre>
345: dnf install LONCAPA-prerequisites
346: </pre>
347: <p>
348: If you still have errors, please contact the LON-CAPA Helpdesk: helpdesk at loncapa.org
349: </p>
350: <p>Ensure that LON-CAPA network services and the httpd service are set to start on boot:
351: <pre>
352: systemctl enable loncontrol
353: systemctl enable httpd
354: </pre>
355:
356: <p>
357: Point a web browser at your new machine and log in as the domain
358: coordinator. Congratulations!
359: </p>
360:
361: <hr>
362: <h2>If things aren't working right</h2>
363: <p>
364: If you've followed the steps above and the server doesn't start or you think
365: there's something wrong, please contact the LON-CAPA helpdesk.
366: Installation/update support is available from: helpdesk at loncapa.org
367: (replace " at " with @).
368: If there were errors in installation of the dependency RPMs or errors during the
369: automatic setup, please send us as much information as possible.
370: If some part of this document is unclear please let us know.
371: </p>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>