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.
|
Old Machine |
New Machine |
|
|
|
1 |
|
Obtain a temporary IP address
for your new machine |
2 |
|
Install LON-CAPA according to
http://install.lon-capa.org/
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. |
4 |
Shutdown all LON-CAPA services
/etc/init.d/httpd stop
/etc/init.d/loncontrol
stop |
|
5 |
|
Shutdown all LON-CAPA services
/etc/init.d/httpd stop
/etc/init.d/loncontrol stop |
6 |
|
Transfer the contents of
/home
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 |
6b |
|
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
/home/httpd/perl/debug/db_copy.pl
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/';
to
my $dir = $perlvar{'lonUsersDir'}; Depending on how much data
you have, this might run for quite some time!
|
7 |
|
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 |
9 |
|
Run
cd /root/loncapa-N.N (N.N should correspond to a version number
like '1.3')
./UPDATE
again (you would have
done so the first time during the initial install). |
10 |
Write down IP address and
hostname |
|
11 |
Take completely offline |
|
12 |
|
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 |
14 |
|
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. |
15 |
Before you ever fire up this machine
again, give it a new hostname
and IP while the ethernet cable is unplugged |
|
16 |
|
Enjoy |