You will need to check all the following things to ensure proper installation of your LON-CAPA system.

Creating a user 'www'

Execute the following command to create a user named 'www' on your LON-CAPA server:

/usr/sbin/useradd www

Make a LON-CAPA system work with shadow passwords

Step #Description
1

Is your system using shadow passwords? (Note: LON-CAPA will work with either MD5/non-MD5 configured systems). It is strongly recommended to use shadow passwords. If your system is currently not using shadow passwords, run the "pwconv" command (as root) in order to convert to shadow passwords. If you choose not to use shadow passwords, then do not perform any of the additional steps. If your system is using shadow passwords, then you will need to perform the additional steps below.

How to detect:
command: cat /etc/passwd | grep ':x:'

If there is output such as "root:x:0:0:root:/root:/bin/bash", then your system is using shadow passwords and you will need to continue with the steps below.

2

Retrieve the mod_auth_external source by running the following command

wget http://www.unixpapa.com/software/mod_auth_external-2.1.15.tar.gz

3

Unpack the mod_auth_external source by running the following command

tar xzvf mod_auth_external-2.1.15.tar.gz

4

Go to the pwauth directory by running the following command

cd mod_auth_external-2.1.15/pwauth/

5

Edit config.h and change SERVER_UIDS definition

Determine the user id of 'www':
id -u www
Change the line
#define SERVER_UIDS 99 /* user "nobody" */
to be
#define SERVER_UIDS 513 /* user "www" */
where in this example 513 corresponds to the user id of 'www'.

6

Compile the pwauth executable by running the following command

make

7

Install pwauth by doing the following

cp pwauth /usr/local/sbin/
chmod 6755 /usr/local/sbin/pwauth

Edit (creating the file) /etc/pam.d/pwauth to have the contents:

        auth       required     /lib/security/pam_pwdb.so shadow nullok
        auth       required     /lib/security/pam_nologin.so
        account    required     /lib/security/pam_pwdb.so

Installing LON-CAPA files

Download the most current loncapa-current.tar.gz.

wget http://install.lon-capa.org/versions/loncapa-current.tar.gz
tar xzvf loncapa-current.tar.gz
cd loncapa-N.N (N.N is the version number)

The UPDATE command will refresh your filesystem with all the latest LON-CAPA software.

./UPDATE

Checking your Linux RPMs on RedHat

The CHECKRPMS command will check the RPMs on your machine against an FTP repository, if you're using a RedHat server.

./CHECKRPMS

If you are not installing on RedHat, you may need to manually install some software. The following pointers may be useful:

Fixing /etc/hosts

A common RedHat glitch of new installations (RedHat's fault, not LON-CAPA) is the generation of /etc/hosts.

It should look something like this (except the myschool line should be replaced with settings specific to your machine):

127.0.0.1		localhost.localdomain localhost
12.34.56.78		www.myschool.edu myschool

Configuring the MySQL database

The following commands describe how to configure the MySQL database on your LON-CAPA server.
Note:

The following instructions assume you are logged in as 'root'.

Entering the mysql shell

mysql -u root -p mysql
OR
mysql -u root mysql (depending on whether you have set a root password)

Creating the mysql 'www' user (after entering mysql shell)

mysql> CREATE DATABASE loncapa;

mysql> INSERT INTO user (Host, User, Password)
mysql> VALUES ('localhost','www',password('localhostkey'));

mysql> INSERT INTO db VALUES ('localhost','loncapa','www',
mysql> 'Y','Y','Y','Y','Y','Y','N','Y','Y','Y');

mysql> FLUSH PRIVILEGES;

SECURITY: set a password for the mysql 'root' user

shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('ROOTPASSWORD');

SECURITY: only allow access from localhost

shell> mysql -u root -p mysql
mysql> DELETE FROM user WHERE host<>'localhost';

Testing to see if the LON-CAPA server is operational

The TEST command will check the installation software, the perl libraries on your system, the MySQL database, and will also automatically test the real-time operation of the LON-CAPA Apache web server.

./TEST

Using the TEST command will likely be an iterative process. It is normal to expect that the TEST command will recommend you perform various steps to ensure optimal performance of your LON-CAPA server.