Annotation of doc/build/RHEL4_install.frag, revision 1.7

1.1       raeburn     1: <h1>Installing LON-CAPA on a minimal Red Hat Enterpise Linux 4 ES System</h1>
                      2: <p>
                      3: This document guides you through the process of setting up a new LON-CAPA
                      4: server running Red Hat Enterpise Linux 4 (ES) with a minimum of packages installed.  
                      5: The computer will be configured solely as a LON-CAPA server and will be 
                      6: expected to have no other services running.  Your server is expected to have
                      7: a reasonably 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 getting easier and easier.  However, it is still a
                     16: non-trivial undertaking and experience with Red Hat Linux will make this 
                     17: process easier.  You will be required to log in to the machine and execute
                     18: some routine Unix commands.  Familiarity with the Apache web server, mod_perl, 
                     19: perl, and MySQL are not required to install and run LON-CAPA.
                     20: </p>
                     21: 
                     22: <h2>Installation Overview</h2>
                     23: <p>
                     24: The installation process takes the following steps:
                     25: </p>
                     26: <ol>
                     27:   <li> Obtain Red Hat Enterprise Server installation CDs</li>
                     28:   <li> Determine Network Settings</li>
                     29:   <li> Install Red Hat 4</li>
                     30:   <li> Update your system</li>
                     31:   <li> Install LON-CAPA</li>
                     32:   <li> Create a Domain Coordinator</li>
                     33:   <li> Start/Restart services</li>
                     34:   <li> Log in to LON-CAPA</li>
                     35: </ol>
                     36: 
                     37: <h2>Obtain Red Hat Enterprise Server CDs</h2>
                     38: <p>
                     39: RHEL4 ES CDs can be purchased from Red Hat:  
                     40: <a href="http://redhat.com/">http://redhat.com/</a>.
                     41: For the minimal install on 32-bit architecture you will need only the first two CDs.
                     42: </p> 
                     43: 
                     44: <h2>Determine Network Settings</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: </p>
                     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>Minimal Red Hat Enterprise Linux 4 Install</h2>
                     59: <p>
                     60: Installing Red Hat Enterprise Linux is quite easy if you've installed any of 
                     61: the Red Hat products before.  Documentation is available from
                     62: <a href="http://www.redhat.com/docs/manuals/enterprise/">
                     63: http://www.redhat.com/docs/manuals/enterprise/</a>
                     64: Specific comment is provided for some of the installation steps below.
                     65: </p>
                     66: <dl style="list-style:square outside none">
                     67:    <dt>Installation Type</dt>
                     68:    <dd>Choose "Server" installation
                     69:    <dt>Partitioning your Drive</dt>
                     70:    <dd>You may want to use the automatic partitioning feature of the installer,
                     71:        however you should review the results and be prepared to modify them.
                     72:        LON-CAPA resource files are stored in the /home directory, so the
                     73:        majority of the disk space should be allocated here.  If you have 20 GB 
                     74:        of space for RHEL4, /home should receive at least 10 to 12 gigs.  
                     75:        Since MySQL uses the /var filesystem to store its databases you should
                     76:        have at least 4 gigs of space available on /var.  Be sure to 
                     77:        include adequate swap space.  A minimum is 512 Megs, but you should
                     78:        typically have 1 or 2x as much swap space as you do physical RAM.</dd>
                     79:    <dt>Network Configuration</dt>
                     80:    <dd>LON-CAPA will <b>not</b> work with a machine set up to use a dynamic 
                     81:        IP address.  When configuring your network card, be sure to unselect
                     82:        the DHCP option and enter in your network information.</dd>
                     83:    <dt>Firewall Configuration</dt>
                     84:    <dd>Select SSH (remote login), HTTP/HTTPS (web server).</dd>
                     85:    <dt>SELinux Configuration</dt>
                     86:    <dd>Choose an SElinux setting of 'disabled' or 'warn', unless you are 
                     87:        familiar with SElinux and writing security policies 
                     88:        <b>and want to help us write a security policy for LON-CAPA</b>.
                     89:    <dt>Software Packages</dt>
                     90:    <dd>Choose the "Customize software packages to be installed" option. 
                     91:    <dt>Package Group Selection</dt>
                     92:    <dd>Choose 'Minimal' which is the last item on the list.</dd>
                     93: </dl>
                     94: <p>
                     95: Finish installing your server, reboot it, and log in as root.
                     96: </p>
                     97: 
                     98: <!---
                     99: 
                    100: The firewall should be customized to allow incoming ssh and www.  
                    101:        Additional ports used by LON-CAPA are 5663 and 8080.  
                    102:        Enter these in the entry box as <nobr>"5663:tcp, 8080:tcp"</nobr>.</dd>
                    103: 
                    104: -->
                    105: 
                    106: <h2>Update your system</h2>
                    107: <p>Import the GPG key for use in verifying packages retrieved from the Red Hat Network.
                    108: <pre>
                    109: rpm --import /usr/share/rhn/RPM-GPG-KEY
                    110: </pre>  
                    111: Next you will need to register your server with the Red Hat Network.</p>
                    112: <p>Information about registration for the Red Hat Network can be found at: 
                    113: <a href="http://www.redhat.com/software/rhn/">http://www.redhat.com/software/rhn/</a>. You can register directly from the server where you will be installing LON-CAPA using:
                    114: <pre>
                    115: up2date --register
                    116: </pre>
                    117: Once you have registered your system so it has access to Red Hat package updates, you should first check the up2date configuration, and make any necessary changes (e.g., disable skipping of kernel updates).
                    118: <pre>
                    119: up2date-config
                    120: </pre>
                    121: Next update your system to the latest versions of the system software using up2date.
                    122: <pre>
                    123: up2date -u
                    124: </pre>
                    125: <p>
                    126: Reboot your system before continuing with the installation.
                    127: </p>
                    128: <p>
                    129: Retrieve the RHEL4_loncapa_rhnsources file from the LON-CAPA install site:
                    130: </p>
                    131: <pre>
1.4       raeburn   132: wget http://install.loncapa.org/versions/redhat/4ES/RHEL4_loncapa_rhnsources
1.1       raeburn   133: </pre>
                    134: <p>
                    135: Install the RHEL4_loncapa_rhnsources
                    136: </p>
                    137: <p>
                    138: <pre>
                    139: mv /etc/sysconfig/rhn/sources /etc/sysconfig/rhn/sources.backup
                    140: cp RHEL4_loncapa_rhnsources  /etc/sysconfig/rhn/sources
                    141: up2date
                    142: </pre>
                    143: </p>
                    144: 
                    145: 
                    146: <h2>Installing LON-CAPA</h2>
                    147: <h3>Install prerequisites</h3>
                    148: <p>Import the GPG key for use in verifying LON-CAPA packages retrieved from the LON-CAPA installation site.
                    149: <pre>
1.4       raeburn   150: rpm --import http://install.loncapa.org/versions/redhat/RPM-GPG-KEY-loncapa  
1.1       raeburn   151: </pre>
                    152: </p>
                    153: <p>Execute the installation </p>
                    154: <pre>
1.3       albertel  155: up2date LONCAPA-prerequisites
1.1       raeburn   156: </pre>
1.7     ! raeburn   157: This may take some minutes due to LON-CAPA's large number of dependencies.
1.1       raeburn   158: </p>
                    159: <h3>Retrieve and execute LON-CAPA setup program</h3>
                    160: <p>
                    161: Retrieve the LON-CAPA setup with the following command:
                    162: </p>
                    163: <pre>
1.7     ! raeburn   164: wget http://install.loncapa.org/linux/install.tar
1.1       raeburn   165: </pre>
                    166: <p>
                    167: Extract the archive with the following command:
                    168: </p>
                    169: <pre>
1.7     ! raeburn   170: tar xf install.tar
1.1       raeburn   171: </pre>
                    172: <p>
                    173: This creates a directory named <tt>installation</tt>.  Change to it and
                    174: execute the setup script with the following commands:
                    175: </p>
                    176: <pre>
                    177: cd installation
                    178: ./install.pl
                    179: </pre>
                    180: <p>
1.7     ! raeburn   181: The script is used to prepare a Linux system to run LON-CAPA, and can also be
        !           182: 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.
        !           183: </p>
        !           184: <p>
        !           185: 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.
        !           186: Once a choice has been entered for all nine possible actions, required changes will be made.
        !           187: </p>
        !           188: <p>The possible actions are:
        !           189: <ul>
        !           190: <li>Create the www user/group</li>
        !           191: <li>Install the package LON-CAPA uses to authenticate users.</li>
        !           192: <li>Set-up the MySQL database</li>
        !           193: <li>Set-up MySQL permissions</li>
        !           194: <li>Configure Apache web server</li>
        !           195: <li>Configure start-up of services</li>
        !           196: <li>Check firewall settings</li>
        !           197: <li>Stop services not used by LON-CAPA,<br />
        !           198:     e.g., services for a print server: cups daemon</li>
        !           199: <li>Download LON-CAPA source code in readiness for installation</li>
        !           200: </ul>
1.1       raeburn   201: </p>
                    202: 
                    203: <h3>Determine LON-CAPA Settings</h3>
                    204: <p>
                    205: LON-CAPA requires a number of identifying parameters to be set in order
                    206: for it to function at all.  Below is a list with descriptions.
                    207: </p>
                    208: <dl>
                    209:   <dt>Host Type (library or access)</dt>
                    210:   <dd>The server must be designated a 'library' or an 'access' server.  In
                    211:       general you should have a library server for your instructors to create
                    212:       their course content on and run their courses.  Students should connect
                    213:       to access servers.  If you are doing the first install of LON-CAPA at 
                    214:       your site, or if you are playing with it for your own edification you
                    215:       should make your machine a 'library' server.</dd>
                    216:   <dt>LON-CAPA domain</dt>
                    217:   <dd>Each site or school which installs LON-CAPA needs its own domain.
                    218:       Here at MSU we use 'msu'.  You should choose something short but
                    219:       meaningful.  <i>Restriction: One word, no hyphens, underscores, or 
                    220:       special characters.</i>
                    221:   </dd>
                    222:   <dt>LON-CAPA host id</dt>
                    223:   <dd>Each LON-CAPA server requires a unique internal name.  We use names
                    224:       such as "msul1" for the first library server. <i>Restriction: One word, 
                    225:       no hyphens, underscores, or special characters.</i>
                    226:   </dd>
                    227:   <dt>Host administrator email</dt>
                    228:   <dd>The amount of email sent to this address is relatively minimal.  Messages
                    229:       are sent every time the system starts up, or if the system is in 
                    230:       serious trouble. On a laptop, make this <tt>root@localhost</tt>.
                    231:   </dd>
                    232: </dl>
                    233: 
                    234: <h3>Configuring LON-CAPA</h3>
                    235: <p>
                    236: To configure and install LON-CAPA, execute the following commands:
                    237: </p>
                    238: <pre>
1.7     ! raeburn   239: cd /root/loncapa-X.Y.Z     (X.Y.Z should correspond to a version number like '2.10.0')
1.1       raeburn   240: ./UPDATE
                    241: </pre>
                    242: <p>
                    243: You will need to enter the LON-CAPA configuration information you determined 
                    244: in the previous section.  
                    245: </p>
                    246: 
                    247: <h2>Creating a Domain Coordinator</h2>
                    248: <p>
                    249: You will need at least one user at your site who has the role of
                    250: 'domain coordinator'.  This user creates accounts for other users and
                    251: grants them additional privileges.  The make_domain_coordinator.pl script
1.7     ! raeburn   252: invoked below requires that you enter the user's password.  
        !           253: Feel free to use the "passwd username" command to change it later. 
        !           254: Replace USERNAME and DOMAIN with an appropriate user name and your domain.
1.1       raeburn   255: </p>
                    256: <pre>
1.7     ! raeburn   257: cd /root/loncapa-X.Y.Z/loncom/build
1.1       raeburn   258: perl make_domain_coordinator.pl USERNAME DOMAIN
                    259: </pre>
                    260: 
                    261: <h2>Start/Restart Services</h2>
                    262: <p>
                    263: The LON-CAPA network services take a moment to start.  Most misconfigurations
1.7     ! raeburn   264: will be apparent at this step.
1.1       raeburn   265: </p>
                    266: <pre>
                    267: /etc/init.d/loncontrol start
                    268: /etc/init.d/httpd start
                    269: </pre>
                    270: <p>
                    271: If you receive warnings when starting the httpd about missing perl modules,
                    272: please make sure you followed the instructions in 
                    273: <b>Installing LON-CAPA Dependencies</b>.  If you still have errors, please
                    274: contact the LON-CAPA development team.
                    275: </p>
                    276: <h2>Log in to your LON-CAPA Machine</h2>
                    277: <p>
                    278: Point a web browser at your new machine and log in as the domain
                    279: coordinator.  Congratulations!
                    280: </p>
                    281: 
                    282: <h2>If things aren't working right</h2>
                    283: <p>
                    284: If you've followed the steps above and the server doesn't start or you think 
1.6       raeburn   285: there's something wrong, please get in touch with the LON-CAPA group.
1.2       raeburn   286: You can submit a help request using our web form:<br /> 
1.6       raeburn   287: <a href="http://help.loncapa.org/help/">http://help.loncapa.org/help/</a><br />
1.1       raeburn   288: If there were errors in installation of the dependency RPMs or during the
                    289: automatic setup, please send us as much information as possible.
                    290: If some part of this document is unclear please let us know.
                    291: </p>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>