What is LON-CAPA?  Who is LON-CAPA?  Documentation  Installation  Scholarship  Developers  Events

The LearningOnline Network with CAPA

Home > Installation > Hardware Upgrade

Hardware Upgrade

As LON-CAPA use at your institution grows, you might need to upgrade your hardware (see hardware recommendations).

The basic idea is that the network should not need to know that anything changed on your end, i.e., it does not care about what hardware you run, but it does care about the following (example from MSU):


which is internal hostID, domain, function, and hostname. If in addition, your IP address stays constant (which LON-CAPA caches), the transition is the smoothest.

Here's a guide on how to best accomplish this for a library server:

  Old Machine New Machine
1   Obtain a temporary IP address for your new machine

Install LON-CAPA according to

Choose production and set the hostid/domain to be the same as on the old machine

3 Schedule system downtime, about three hours  
3a   Optional step: you can speed up your system downtime by running the rsync command in step 6 in advance of your downtime. You can do this while your old server remains in production. You still need to run it again during the actual system time, but then rsync will only transfer the files that changed.

Shutdown all LON-CAPA services

/etc/init.d/httpd stop

/etc/init.d/loncontrol stop


Shutdown all LON-CAPA services

/etc/init.d/httpd stop

/etc/init.d/loncontrol stop



Transfer the contents of


to the new machine

The best way of doing this is with rsync (be sure to be on the new machine and enter in the exact order):

rsync --delete -avze "ssh" oldmachine-name:/home/ /home

For example:

rsync --delete -avze "ssh" loncapa.foobar.edu:/home/ /home


If and only if the old machine was 32-bit and the new machine is 64-bit (we assume you won't go the other way around, would you?):

As user www, execute


You are www, aren't you? And you really are switching from 32-bit to 64-bit? Okay.

You might have to change line 82 in it from
my $dir = $perlvar{'lonUsersDir'}.'/temp/y/';
my $dir = $perlvar{'lonUsersDir'};

Depending on how much data you have, this might run for quite some time!


If you have file-system authenticated LON-CAPA users (try not to!), transfer the respective sections of /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow from the old machine to the new one. Warning: this does not work if you go from Fedora to SUSE or vice versa, since these distributions use different encryption algorithms. If you switch distributions, you need to make the file-system-based LON-CAPA users from the command line.

If you have Kerberos authenticated users, copy /etc/krb5.conf

8   If you made any other changes in /etc on the old machine that are relevant (e.g., other authentication mechanisms), make sure that those are also transferred


cd /root/loncapa-N.N (N.N should correspond to a version number like '1.3')

again (you would have done so the first time during the initial install).

10 Write down IP address and hostname  
11 Take completely offline  

Give same IP address and hostname as old machine. Which tool to use depends on the distribution:

fedora/RHEL: system-config-network
SuSE/SLES: yast

13   Restart

Test the new machine, see if everything works, including local authentication methods, etc.

If anything goes wrong that you cannot quickly fix, take this machine offline, plug the old machine back in, and try another day.


Before you ever fire up this machine again, give it a new hostname and IP while the ethernet cable is unplugged

16   Enjoy

Contact Us: lon-capa@lon-capa.org

Site maintained by Gerd Kortemeyer.
Supported by the National Science Foundation under NSF-ITR 0085921, NSF-CCLI-ASA 0243126, and NSF-CCLI 0717790. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. Initial funding for CAPA has been provided by the Alfred. P. Sloan Foundation and the Andrew W. Mellon Foundation.

©2013 Michigan State University Board of Trustees.