Recently, I decide to upgrade all of the Fedora Linux servers. As of today, the latest version is Fedora 15. As for my servers, they are in between Fedora 11 and 14. In the other words, I will need to upgrade some machine from 11 all the way to 15.
There are several ways to upgrade the Fedora system. You can either do it through the GUI (With physical access to the machine), GUI (Though VNC), or command line. I prefer the last option because I have limited number of monitors and input devices.
I haven’t tried upgrading Fedora through command line before. The experience is very different comparing to FreeBSD. So I am going to list out what I have done step by step:
1. Backup your data. Although I haven’t experienced any data loss during the upgrade. It is always a good idea to have a backup first.
2. Make sure that your system is up to date with your current version:
sudo yum update
3. Install preupgrade:
sudo yum install preupgrade -y
4. Run the preupgrade:
sudo preupgrade-cli "Fedora 15 (Lovelock)"
It will download the packages from the server. Depending on your system settings, my system downloaded around 1500 packages, which took about 10 to 20 minutes. After that, it will prompt to reboot the machine.
5. This step is optional. Connect your monitor, keyboard and mouse to the machine.
6. Reboot your server
sudo reboot
7. Now the system will boot into the upgrade interface and perform the upgrade. Notice that this step can easily take 2 to 3 hours (My machine: Q6700 Quad Core, Ram: 8GB). During the upgrade, you cannot remotely access the computer. If you try to connect a monitor / keyboard / mouse, it may give no response. Just be patient and wait. It is not a good idea to reboot your machine at this stage.
8. After waiting for nearly 2.5 hour (2 hours to unpack and install the package, half hour to clean up the package), the machine finally reboots.
9. You should be able to remotely access this machine from SSH. Run the following command to determine your Fedora version:
cat /etc/redhat-release && uname -a
10. Run the following commands to clean up the system:
sudo yum update sudo package-cleanup --orphans sudo updatedb sudo yum repolist sudo yum distro-sync
10. Enjoy your new system.
Our sponsors: