Installing LON-CAPA on a Fedora Core 3 Linux System

This document guides you through the process of installing LON-CAPA on a Fedora Core 3 (FC3) system. Information about Fedora is available from http://fedora.redhat.com/. More information about LON-CAPA is available from http://www.loncapa.org and http://install.loncapa.org.

These instructions assume you have installed Fedora Core 3 on your system and it is running properly. All of the LON-CAPA data is stored in /home/httpd. MySQL is used to store temporary caches of system data, by default this uses storage space in /var/lib/mysql. You will want to be sure you have enough disk space for these two partitions.

Please keep your system up to date. By default, LON-CAPA will add its own repository to your /etc/yum.conf file. Additionally, yum will be run every morning to determine if there are any packages which need to be upgraded. If there are, an email will be sent to the server administrator (specified in the LON-CAPA installation). It behooves you to keep your system up to date.

Installation Overview

The installation must be done as root.

The installation process takes the following steps:

  1. Install LON-CAPA yum.conf
  2. Install LON-CAPA
  3. Create a Domain Coordinator
  4. Start/Restart services
  5. Log in to LON-CAPA

Install LON-CAPA yum.conf

You will need to copy the loncapa_yum.conf file over the default yum.conf file.

mv /etc/yum.conf /etc/yum.conf.backup
cp loncapa_yum.conf /etc/yum.conf

Install LON-CAPA

Remove conflicting packages

You will need to remove the following packages which conflict with LON-CAPA.

List the packages you have installed that match by executing:
rpm -q -f | grep PACKAGENAME
You can remove the packages individually using
rpm -e PACKAGENAME
You will need to remove all of the packages which depend on the ones you are removing. You can remove the associated packages en mass if you are satisfied the prior command selected all the appropriate packages:
rpm -q -a | grep PACKAGENAME | rpm -e

Install prerequisites

We have provided many of the packages needed for LON-CAPA in the installation bundle. They reside in the prerequisites directory. You will need to install them using the following commands:

cd prerequisites
rpm -Uvh *rpm
You will need to resolve any errors this process generated. For packages that are already installed you can simply remove them from the directory:
mv CONFLICTINPACKAGE*.rpm ..
And try the installation command again. If there are required packages which have not been installed, these should be found on your Fedora Core 3 installation CDs.

Determine LON-CAPA Settings

LON-CAPA requires a number of identifying parameters be set in order for it to function at all. Below is a list with descriptions.

Host Type (library or access)
The server must be designated a 'library' or an 'access' server. In general you should have a library server for your instructors to create their course content on and run their courses. Students should connect to access servers. If you are doing the first install of LON-CAPA at your site, or if you are playing with it for your own edification you should make your machine a 'library' server.
LON-CAPA domain
Each site or school which installs LON-CAPA needs its own domain. Here at MSU we use 'msu'. You should choose something short but meaningful. Restriction: One word, no hyphens, underscores, or special characters.
LON-CAPA host id
Each LON-CAPA server requires a unique internal name. We use names such as "msul1" for the first library server. Restriction: One word, no hyphens, underscores, or special characters.
Host administrator email
The amount of email sent to this address is relatively minimal. Messages are sent every time the system starts up, or if the system is in serious trouble. On a laptop, make this root@localhost.

Install and Configuring LON-CAPA

To configure and install LON-CAPA, execute the following commands:

cd ~/loncapa_install/
./install.pl
You will need to enter a root password for MySQL. Once this is complete you will need to execute:
cd /root/loncapa-1.3.2
./UPDATE

You will need to enter the LON-CAPA configuration information you determined in the previous section.

Creating a Domain Coordinator

You will need at least one user at your site who has the role of 'domain coordinator'. This user creates accounts for other users and grants them additional privileges. The make_domain_coordinator.pl script invoked below requires that you enter the users password. The password will show in plaintext as you type it. Feel free to use the "passwd username" command to change it later. Replace USERNAME and DOMAIN with an appropriate user name and your domain.

cd /root/loncapa-1.3.2/loncom/build
perl make_domain_coordinator.pl USERNAME DOMAIN
(WILL PROMPT FOR PASSWORD HERE)
mkdir ~USERNAME/public_html
chown USERNAME:www ~USERNAME/public_html
chmod 0775 ~USERNAME/public_html
chmod a+x ~USERNAME

Start/Restart Services

The LON-CAPA network services take a moment to start. Most misconfigurations will be appearant at this step.

/etc/init.d/loncontrol start
/etc/init.d/httpd start

If you receive warnings when starting the httpd about missing perl modules, please make sure you followed the instructions in Installing LON-CAPA Dependencies. If you still have errors, please contact the LON-CAPA development team.

Log in to your LON-CAPA Machine

Point a web browser at your new machine and log in as the domain coordinator. Congratulations!

If Things aren't working right

If you've followed the steps above and the server doesn't start or you think there's something wrong, please get in touch with the LON-CAPA developers. If there were errors in installation of the dependency RPMs or during the automatic setup, please send us as much information as possible. If some part of this document is unclear please let us know.