Live Upgrading Remote Servers for Beginners
(Work in progress) This guide is slightly different from YumUpgradeFaq in that it addresses upgrading machines you don't have easy physical access to. There are alot of benefits to doing this on a Server class machine, in general you won't have as many packages installed as a Desktop class machine (X/Gnome etc.) reducing some of the complexity. At the same time it opens the potential for huge problems if something does go wrong during the upgrade.
Warning
Disclaimer
I carried out this procedure on a server to which I had nothing but SSH access to. If you have physical access to the machine to be upgraded, using the install media & anaconda would be far easier. At each stage I carefully examined /boot/grub/grub.conf
to ensure I would come back up on the correct kernel with each reboot. I suggest you rehearse each step carefully on a local/virtual machine before taking the plunge.
Getting Started
- Backup your configuration files, some packages will replace their configuration files during the upgrade. You could just
[root@host ~]# tar cf etc.tar /etc
and keep it in a safe place. - Backup, Backup, Backup any important data.
- Shutdown unnecessary services (SMTP, HTTP, MySQL etc.) while the upgrade is taking place.
- Prune the installed packages as much as possible, in particular packages like
php
are gigantic dependancy web's, the upgrade will go alot smoother and quicker if you remove things like this. - Fedora Core releases prior to Fedora Core 7 have been removed from the regular mirror servers, they are however available from archives.fedoraproject.org and a small selection of mirrors[1]. With each upgrade of the
fedora-release
package your/etc/yum.repos.d
directory may need manual tweaking to select your perferred mirror.
Redhat Linux 9 -> Fedora Core 1
# rpm --import "http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4F2A6FD2" # rpm -U --nodeps http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/i386/os/Fedora/RPMS/yum-2.0.4-2.noarch.rpm \ http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/i386/os/Fedora/RPMS/libxml2-python-2.5.11-1.i386.rpm \ http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/i386/os/Fedora/RPMS/gettext-0.12.1-1.i386.rpm \ http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/i386/os/Fedora/RPMS/libxml2-2.5.11-1.i386.rpm \ http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/i386/os/Fedora/RPMS/libgcj-3.3.2-1.i386.rpm
Check your /etc/yum.repos.d
and/or edit yum.conf
archives.fedoraproject.org is the only mirror I found to contain Fedora Core 1.
# yum upgrade
If you encounter any dependancy issues at this stage, its wise to try and remove the packages causing the problem. Getting a trouble-free yum upgrade
at this step is ideal.