Annotation of doc/build/fedora_install.frag, revision 1.5

1.5     ! matthew     1: <h1>Installing LON-CAPA on a Fedora Core 2 Linux System</h1>
1.1       matthew     2: <p>
                      3: This document guides you through the process of setting up a new LON-CAPA
1.5     ! matthew     4: server running Fedora Core 2 (FC2).  The computer will be configured solely as
1.1       matthew     5: a LON-CAPA server and will be expected to have no other services running
                      6: on it.
                      7: </p><p>
                      8: More information is available at <a href="http://install.lon-capa.org/">
                      9: http://install.lon-capa.org/</a>.
                     10: </p>
                     11: 
                     12: <h2>Before you begin</h2>
                     13: <p>
                     14: Installing Linux is getting easier and easier.  However, it is still a
                     15: non-trivial undertaking and experience with Red Hat Linux will make this 
                     16: process easier.  You will be required to log in to the machine and execute
                     17: some routine Unix commands.  Some familiarity with Linux is assumed.  
                     18: Familiarity with the Apache web server, mod_perl, perl, and MySQL are not 
                     19: 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 Linux </li>
                     28:   <li> Determine Network Settings</li>
                     29:   <li> Install Fedora </li>
                     30:   <li> Install LON-CAPA Dependencies </li>
                     31:   <li> Determine your LON-CAPA Settings </li>
                     32:   <li> Install LON-CAPA </li>
                     33:   <li> Configure LON-CAPA </li>
                     34:   <li> Pick a hosts.tab file </li>
                     35:   <li> Create a Domain Coordinator </li>
                     36:   <li> Start/Restart services </li>
                     37:   <li> Log in to LON-CAPA </li>
                     38: </ol>
                     39: 
                     40: <h2>Obtain Fedora Linux</h2>
                     41: <p>
                     42: Fedora linux ISO files can be obtained from the projects main site,
                     43: <a href="http://fedora.redhat.com/">http://fedora.redhat.com/</a>.
                     44: </p>
                     45: 
                     46: <h2>Determine Network Settings</h2>
                     47: <p>
                     48: You will need to know the following network settings for your installation.  
                     49: <b>Note:</b>You must have a static IP address to use LON-CAPA.
                     50: DHCP is <em>not</em> supported.
                     51: </p>
                     52: <ul>
                     53:   <li>ip address </li>
                     54:   <li>netmask </li>
                     55:   <li>hostname </li>
                     56:   <li>gateway </li>
                     57:   <li>domain name server(s) </li>
                     58: </ul>
                     59: 
                     60: <h2>Install Fedora</h2>
                     61: <p>
                     62: Installing Fedora is quite easy if you've installed any of the Red Hat products
                     63: before.  Some documentation is available from 
                     64: <a href="http://fedora.redhat.com/projects/anaconda-installer/">
                     65: http://fedora.redhat.com/projects/anaconda-installer/</a>.
                     66: There are a few sections that require comment.
                     67: </p>
                     68: <dl style="list-style:square outside none">
                     69:    <dt>Installation Type</dt>
                     70:    <dd>You should do a "Server" install.  We do not recommend
                     71:        trying to install LON-CAPA with a different installation type.</dd>
                     72:    <dt>Partitioning your Drive</dt>
                     73:    <dd>You may want to use the automatic partitioning feature of the installer,
                     74:        however you should review the results and be prepared to modify them.
                     75:        LON-CAPA resource files are stored in the /home directory, so the
                     76:        lion's share of the drive should be allocated here.  If you have 20 GB 
1.2       matthew    77:        of space for Red Hat, /home should receive at least 10 to 12 gigs.  
                     78:        Since MySQL uses the /var filesystem to store its databases you should
                     79:        have at least 4 gigs of space available on /var.  Be sure to 
1.1       matthew    80:        include adequate swap space.  A minimum is 512 Megs, but you should
                     81:        typically have 1 or 2x as much swap space as you do physical RAM.</dd>
                     82:    <dt>Network Configuration</dt>
                     83:    <dd>LON-CAPA will <b>not</b> work with a machine set up to use a dynamic 
                     84:        IP address.  When configuring your network card, be sure to unselect
                     85:        the DHCP option and enter in your network information.</dd>
                     86:    <dt>Firewall Configuration</dt>
                     87:    <dd>The firewall should be customized to allow incoming ssh and www.  
                     88:        Additional ports used by LON-CAPA are 5663 and 8080.  
                     89:        Enter these in the entry box as <nobr>"5663:tcp, 8080:tcp"</nobr>.</dd>
                     90:    <dt>Package Group Selection</dt>
                     91:    <dd>
                     92:        <b>Do not</b> install a web server.  It is intentially omitted from
                     93:        this list.  Installing packages not listed below is not recommended.
                     94:        If you install packages not listed below you should expect difficulties
                     95:        when installing the LON-CAPA dependencies.
                     96:       <ul>
                     97:          <li>Editors</li>
                     98:          <li>Text Based Internet</li>
                     99:          <li>Authoring and Publishing</li>
1.5     ! matthew   100:          <li>Server Configuration Tools</li>
1.4       matthew   101:          <li>Development Tools</li>
                    102:          <li>Administration Tools</li>
                    103:          <li>Printing Support</li>
1.1       matthew   104:       </ul>
                    105:    </dd>
                    106: </dl>
                    107: <p>
                    108: Finish installing your server, reboot it, and log in as root.
                    109: </p>
                    110: 
                    111: <h2>Retrieving the LON-CAPA Installation Archive</h2>
                    112: <p>
                    113: Execute the following command:
                    114: </p>
                    115: <pre>
                    116: wget http://install.loncapa.org/versions/fedora/fedora_install.tar
                    117: </pre>
                    118: <p>
                    119: This will retrieve from the LON-CAPA website all the packages needed to get
                    120: LON-CAPA running on your system, except for the LON-CAPA source itself.
                    121: </p>
                    122: <p>
                    123: Extract the archive with the following command:
                    124: </p>
                    125: <pre>
                    126: tar xf fedora_install.tar
                    127: </pre>
                    128: <p>
                    129: This creates a directory named <tt>installation</tt>.
                    130: </p>
                    131: 
                    132: <h2>Installing LON-CAPA Dependencies</h2>
                    133: <p>
                    134: This section walks you through installing the packages which LON-CAPA requires.
1.3       matthew   135: There are a lot of dependencies.  They have been grouped in a
1.1       matthew   136: somewhat logical fashion to make them easier to deal with.  When installing
1.5     ! matthew   137: the rpms you should watch for errors.  Errors generated by RPMs which are 
        !           138: already should not be considered a problem, although you will have to ensure 
        !           139: the other rpms in the directory get installed.
        !           140: </p><p>
        !           141: First, we need to make sure the web server and mod_perl have not been 
        !           142: installed.  Use the following commands to remove them if they exist:
        !           143: </p><p>
        !           144: <pre>
        !           145: rpm -e `rpm -q -a | grep httpd`
        !           146: rpm -e `rpm -q -a | grep mod_perl`
        !           147: </pre>
        !           148: </p><p>
        !           149: If the above commands returns no output (the usual indicator of success), or an
        !           150: error message 'rpm: no packages given for erase' (meaning there were no
        !           151: packages that contain httpd or mod_perl), you are good to go.  
1.1       matthew   152: </p><p>
1.5     ! matthew   153: To install the many LON-CAPA dependencies, execute the following commands:
1.1       matthew   154: </p>
                    155: <pre>
                    156: cd installation
                    157: cd mysql
                    158: rpm -Uvh *rpm
                    159: cd ../apache
                    160: rpm -Uvh *rpm
                    161: cd ../mod_perl
                    162: rpm -Uvh *rpm
                    163: cd ../perl_dependencies
                    164: rpm -Uvh *rpm
                    165: cd ../GD
                    166: rpm -Uvh *rpm
                    167: cd ../gnuplot
                    168: rpm --install --oldpackage readline-2.2.1-6.i386.rpm
                    169: rpm --install --oldpackage --excludedocs libpng-1.0.12-2.i386.rpm
                    170: rpm -Uvh gnuplot-3.7.1-5.i386.rpm libgd-1.3-4.i386.rpm ncurses4-5.0-5.i386.rpm
                    171: cd ../misc
                    172: rpm -Uvh *rpm
                    173: cd ..
                    174: </pre>
                    175: <p>
                    176: <b>Notes:</b>
                    177: <ul>
                    178:     <li>MySQL is used to store caches of data, not original copies.  
                    179:         Administering LON-CAPA machines does not yet mean becoming a 
                    180:         database administrator.</li>
                    181:     <li>Apache 1.3 and mod_perl 1.x are required by LON-CAPA.  These are
1.5     ! matthew   182:         provided in the installation package.  The mod_perl package has been
        !           183:         repackaged from the Redhat sources with the name 'mod_perl_1' in
        !           184:         order to prevent version 1.99 of mod_perl from being installed by 
        !           185:         yum or other package managers.</li>
1.1       matthew   186:     <li>A specific version of Gnuplot is required by LON-CAPA.  Do not
                    187:         install a version different from the one included in the LON-CAPA
1.5     ! matthew   188:         installation package.  We're still working on using gnuplot 4.0 which
        !           189:         recently came out.</li>
1.1       matthew   190: </ul>
                    191: </p>
                    192: 
                    193: <h2>Configuring LON-CAPA Dependencies</h2>
                    194: <p>
                    195: We have prepared a script which takes care of most of the configuration that
                    196: must be done to get the newly installed packages working with LON-CAPA.  
                    197: This script will retrieve the latest LON-CAPA release from
                    198: <a href="http://install.loncapa.org">http://install.loncapa.org</a>.
                    199: You will be prompted for a root password for your MySQL server.  You 
                    200: will need to remember this password in case you should ever need to make
                    201: changes the the server.
                    202: </p><p>
                    203: Execute the script as follows:
                    204: </p>
                    205: <pre>
                    206: cd setup;
                    207: ./install.pl
                    208: </pre>
                    209: 
                    210: <h2>Determine LON-CAPA Settings</h2>
                    211: <p>
                    212: LON-CAPA requires a number of identifying parameters be set in order
                    213: for it to function at all.  Below is a list with descriptions.
                    214: </p>
                    215: <dl>
                    216:   <dt>Host Type (library or access)</dt>
                    217:   <dd>The server must be designated a 'library' or an 'access' server.  In
                    218:       general you should have a library server for your instructors to create
                    219:       their course content on and run their courses.  Students should connect
                    220:       to access servers.  If you are doing the first install of LON-CAPA at 
                    221:       your site, or if you are playing with it for your own edification you
                    222:       should make your machine a 'library' server.</dd>
                    223:   <dt>LON-CAPA domain</dt>
                    224:   <dd>Each site or school which installs LON-CAPA needs its own domain.
                    225:       Here at MSU we use 'msu'.  You should choose something short but
                    226:       meaningful.  <i>Restriction: One word, no hyphens, underscores, or 
                    227:       special characters.</i>
                    228:   </dd>
                    229:   <dt>LON-CAPA host id</dt>
                    230:   <dd>Each LON-CAPA server requires a unique internal name.  We use names
                    231:       such as "msul1" for the first library server. <i>Restriction: One word, 
                    232:       no hyphens, underscores, or special characters.</i>
                    233:   </dd>
                    234:   <dt>Host administrator email</dt>
                    235:   <dd>The amount of email sent to this address is relatively minimal.  Messages
                    236:       are sent every time the system starts up, or if the system is in 
                    237:       serious trouble. On a laptop, make this <tt>root@localhost</tt>.
                    238:   </dd>
                    239: </dl>
                    240: 
                    241: <h2>Configuring LON-CAPA</h2>
                    242: <p>
                    243: To configure and install LON-CAPA, execute the following commands:
                    244: </p>
                    245: <pre>
1.5     ! matthew   246: cd /root/loncapa-N.N     (N.N should correspond to a version number like '1.2')
1.1       matthew   247: ./UPDATE
                    248: </pre>
                    249: <p>
                    250: You will need to enter the LON-CAPA configuration information you determined 
                    251: in the previous section.  
                    252: </p>
                    253: 
                    254: <h2>Creating a Domain Coordinator</h2>
                    255: <p>
                    256: You will need at least one user at your site who has the role of
                    257: 'domain coordinator'.  This user creates accounts for other users and
                    258: grants them additional privileges.  The make_domain_coordinator.pl script
                    259: invoked below requires that you enter the users password.  The password will
                    260: show in plaintext as you type it.  Feel free to use the "passwd username"
                    261: command to change it later.  Replace USERNAME and DOMAIN with an 
                    262: appropriate user name and your domain.
                    263: </p>
                    264: <pre>
                    265: cd /root/loncapa-N.N/loncom/build
                    266: perl make_domain_coordinator.pl USERNAME DOMAIN
                    267: (WILL PROMPT FOR PASSWORD HERE)
                    268: </pre>
                    269: 
                    270: <h2>Start/Restart Services</h2>
                    271: <p>
                    272: The LON-CAPA network services take a moment to start.  Most misconfigurations
                    273: will be appearant at this step.
                    274: </p>
                    275: <pre>
                    276: /etc/init.d/loncontrol start
                    277: /etc/init.d/httpd start
                    278: </pre>
1.5     ! matthew   279: <p>
        !           280: If you receive warnings when starting the httpd about missing perl modules,
        !           281: please make sure you followed the instructions in 
        !           282: <b>Installing LON-CAPA Dependencies</b>.  If you still have errors, please
        !           283: contact the LON-CAPA development team.
        !           284: </p>
1.1       matthew   285: <h2>Log in to your LON-CAPA Machine</h2>
                    286: <p>
                    287: Point a web browser at your new machine and log in as the domain
                    288: coordinator.  Congratulations!
                    289: </p>
1.4       matthew   290: 
                    291: <h2>If Things aren't working right</h2>
                    292: <p>
                    293: If you've followed the steps above and the server doesn't start or you think 
                    294: there's something wrong, please get in touch with the LON-CAPA developers.
                    295: If there were errors in installation of the dependency RPMs or during the
                    296: automatic setup, please send us as much information as possible.
                    297: If some part of this document is unclear please let us know.
                    298: </p>

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