Annotation of doc/build/FC4_install.frag, revision 1.2

1.1       albertel    1: <h1>Installing LON-CAPA on a minimal Fedora Core 4 Linux System</h1>
                      2: <p>
                      3: This document guides you through the process of setting up a new LON-CAPA
                      4: server running Fedora Core 4 (FC4) 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 Fedora Core 4 installation CDs</li>
                     28:   <li> Determine Network Settings</li>
                     29:   <li> Install Fedora Core 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 Fedora Core 4</h2>
                     38: <p>
                     39: FC4 ISO files can be obtained from the projects main site,
                     40: <a href="http://fedora.redhat.com/">http://fedora.redhat.com/</a>.
                     41: For the minimal install you will need only the first ISO image (e.g., FC4-i386-disc1.iso CD for x86-compatible 32-bit).
                     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 FC4 Install</h2>
                     59: <p>
                     60: Installing Fedora is quite easy if you've installed any of the Red Hat products
                     61: before.  Some documentation is available from 
                     62: <a href="http://fedora.redhat.com/projects/anaconda-installer/">
                     63: http://fedora.redhat.com/projects/anaconda-installer/</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 Type</dt>
                     69:    <dd>Choose "Server" installation
                     70:    <dt>Partitioning your Drive</dt>
                     71:    <dd>You may want to use the automatic partitioning feature of the installer,
                     72:        however you should review the results and be prepared to modify them.
                     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 FC4, /home should receive at least 10 to 12 gigs.  
                     76:        Since MySQL uses the /var filesystem to store its databases you should
                     77:        have at least 4 gigs of space available on /var.  Be sure to 
                     78:        include adequate swap space.  A minimum is 512 Megs, but you should
                     79:        typically have 1 or 2x as much swap space as you do physical RAM.</dd>
                     80:    <dt>Network Configuration</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 in your network information.</dd>
                     84:    <dt>Firewall Configuration</dt>
                     85:    <dd>Select SSH (remote login), HTTP/HTTPS (web server).</dd>
                     86:    <dt>SELinux Configuration</dt>
                     87:    <dd>Choose an SElinux setting of 'disabled' or 'warn', unless you are 
                     88:        familiar with SElinux and writing security policies 
                     89:        <b>and want to help us write a security policy for LON-CAPA</b>.
                     90:    <dt>Package Group Selection</dt>
                     91:    <dd>Choose 'Minimal' which is the last item on the list.</dd>
                     92: </dl>
                     93: <p>
                     94: Finish installing your server, reboot it, and log in as root.
                     95: </p>
                     96: 
                     97: <!---
                     98: 
                     99: The firewall should be customized to allow incoming ssh and www.  
                    100:        Additional ports used by LON-CAPA are 5663 and 8080.  
                    101:        Enter these in the entry box as <nobr>"5663:tcp, 8080:tcp"</nobr>.</dd>
                    102: 
                    103: -->
                    104: 
                    105: <h2>Update your system</h2>
                    106: <p>
                    107: Update your system to the latest versions of the system software using yum.
                    108: Yum is configured to check encyption keys for the packages it installs, so 
                    109: you need to import the keys before invoking yum.
                    110: </p>
                    111: <pre>
                    112: rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
                    113: rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras
                    114: yum update
                    115: </pre>
                    116: <p>
                    117: Reboot your system before continuing with the installation.
                    118: </p>
                    119: <p>
                    120: Retrieve the FC4_loncapa_yum file from the LON-CAPA install site:
                    121: </p>
                    122: <pre>
                    123: wget http://install.loncapa.org/versions/fedora/4/FC4_loncapa_yum.conf
                    124: </pre>
                    125: <p>
                    126: Install the FC4_loncapa_yum.conf
                    127: </p>
                    128: <pre>
                    129: mv /etc/yum.conf /etc/yum.conf.backup
                    130: cp FC4_loncapa_yum.conf /etc/yum.conf
                    131: yum update
                    132: </pre>
                    133: </p>
                    134: 
                    135: 
                    136: <h2>Installing LON-CAPA</h2>
                    137: <h3>Install prerequisites</h3>
                    138: <p> Execute: </p>
                    139: <pre>
                    140: yum install LONCAPA-prerequisites
                    141: </pre><p>
                    142: This may take a moment due to LON-CAPA's large number of dependencies.
                    143: </p>
                    144: <h3>Retrieve and execute LON-CAPA setup program</h3>
                    145: <p>
                    146: Retrieve the LON-CAPA setup with the following command:
                    147: </p>
                    148: <pre>
                    149: wget http://install.loncapa.org/versions/fedora/4/fedora_install.tar
                    150: </pre>
                    151: <p>
                    152: Extract the archive with the following command:
                    153: </p>
                    154: <pre>
                    155: tar xf fedora_install.tar
                    156: </pre>
                    157: <p>
                    158: This creates a directory named <tt>installation</tt>.  Change to it and
                    159: execute the setup script with the following commands:
                    160: </p>
                    161: <pre>
                    162: cd installation
                    163: ./install.pl
                    164: </pre>
                    165: <p>
                    166: This script will prompt you for the MySQL root password and will download the latest LON-CAPA release.<br />
                    167: You can safely ignore the following warnings from gcc 4 when compiling pwauth:<br />
                    168: <tt>
                    169: pwauth.c: In function ‘lastlog’:
                    170: <ul>
                    171: <li>pwauth.c:541: warning: incompatible implicit declaration of built-in function ‘strncpy’</li>
                    172: <li>pwauth.c:543: warning: incompatible implicit declaration of built-in function ‘strlen’</li>
                    173: </ul>
                    174: pwauth.c: In function ‘main’:
                    175: <ul>
                    176: <li>pwauth.c:692: warning: incompatible implicit declaration of built-in function ‘strlen’</li>
                    177: </ul>
                    178: </tt>
                    179: 
                    180: </p>
                    181: 
                    182: <h3>Determine LON-CAPA Settings</h3>
                    183: <p>
                    184: LON-CAPA requires a number of identifying parameters to be set in order
                    185: for it to function at all.  Below is a list with descriptions.
                    186: </p>
                    187: <dl>
                    188:   <dt>Host Type (library or access)</dt>
                    189:   <dd>The server must be designated a 'library' or an 'access' server.  In
                    190:       general you should have a library server for your instructors to create
                    191:       their course content on and run their courses.  Students should connect
                    192:       to access servers.  If you are doing the first install of LON-CAPA at 
                    193:       your site, or if you are playing with it for your own edification you
                    194:       should make your machine a 'library' server.</dd>
                    195:   <dt>LON-CAPA domain</dt>
                    196:   <dd>Each site or school which installs LON-CAPA needs its own domain.
                    197:       Here at MSU we use 'msu'.  You should choose something short but
                    198:       meaningful.  <i>Restriction: One word, no hyphens, underscores, or 
                    199:       special characters.</i>
                    200:   </dd>
                    201:   <dt>LON-CAPA host id</dt>
                    202:   <dd>Each LON-CAPA server requires a unique internal name.  We use names
                    203:       such as "msul1" for the first library server. <i>Restriction: One word, 
                    204:       no hyphens, underscores, or special characters.</i>
                    205:   </dd>
                    206:   <dt>Host administrator email</dt>
                    207:   <dd>The amount of email sent to this address is relatively minimal.  Messages
                    208:       are sent every time the system starts up, or if the system is in 
                    209:       serious trouble. On a laptop, make this <tt>root@localhost</tt>.
                    210:   </dd>
                    211: </dl>
                    212: 
                    213: <h3>Configuring LON-CAPA</h3>
                    214: <p>
                    215: To configure and install LON-CAPA, execute the following commands:
                    216: </p>
                    217: <pre>
                    218: cd /root/loncapa-N.N     (N.N should correspond to a version number like '1.3')
                    219: ./UPDATE
                    220: </pre>
                    221: <p>
                    222: You will need to enter the LON-CAPA configuration information you determined 
                    223: in the previous section.  
                    224: </p>
                    225: 
                    226: <h2>Creating a Domain Coordinator</h2>
                    227: <p>
                    228: You will need at least one user at your site who has the role of
                    229: 'domain coordinator'.  This user creates accounts for other users and
                    230: grants them additional privileges.  The make_domain_coordinator.pl script
                    231: invoked below requires that you enter the users password.  The password will
                    232: show in plaintext as you type it.  Feel free to use the "passwd username"
                    233: command to change it later.  Replace USERNAME and DOMAIN with an 
                    234: appropriate user name and your domain.
                    235: </p>
                    236: <pre>
                    237: cd /root/loncapa-N.N/loncom/build
                    238: perl make_domain_coordinator.pl USERNAME DOMAIN
                    239: (WILL PROMPT FOR PASSWORD HERE)
                    240: mkdir ~USERNAME/public_html
                    241: chown USERNAME:www ~USERNAME/public_html
                    242: chmod 0775 ~USERNAME/public_html
                    243: chmod a+x ~USERNAME
                    244: </pre>
                    245: 
                    246: <h2>Start/Restart Services</h2>
                    247: <p>
                    248: The LON-CAPA network services take a moment to start.  Most misconfigurations
                    249: will be appearant at this step.
                    250: </p>
                    251: <pre>
                    252: /etc/init.d/loncontrol start
                    253: /etc/init.d/httpd start
                    254: </pre>
                    255: <p>
                    256: If you receive warnings when starting the httpd about missing perl modules,
                    257: please make sure you followed the instructions in 
                    258: <b>Installing LON-CAPA Dependencies</b>.  If you still have errors, please
                    259: contact the LON-CAPA development team.
                    260: </p>
                    261: <h2>Log in to your LON-CAPA Machine</h2>
                    262: <p>
                    263: Point a web browser at your new machine and log in as the domain
                    264: coordinator.  Congratulations!
                    265: </p>
                    266: 
                    267: <h2>If things aren't working right</h2>
                    268: <p>
                    269: If you've followed the steps above and the server doesn't start or you think 
                    270: there's something wrong, please get in touch with the LON-CAPA developers.
                    271: If there were errors in installation of the dependency RPMs or during the
                    272: automatic setup, please send us as much information as possible.
                    273: If some part of this document is unclear please let us know.
                    274: </p>

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