Welcome to the tutorial guide. The guide will provide you with instructions and guidance on how to upgrade Fedora using yum. The guide will cover software packages.
Before we go ahead with upgrading Fedora, it is a good idea to fully understand what is yum. Yum is a software package manager and is a tool used for installing, updating, and removing packages and their dependencies on RPM-based systems. Yum makes it easier to maintain groups of machines without having to manually update each one using rpm.
Understanding of problems associated with Fedora
It is good to know what problems can be encountered when upgrading Fedora. These problems are as mentioned below:
- system-config-printer won’t start
Please note that if there is a print server on the local network the printer administration tool system-config-printer may fail to start. This problem is usually fixed
with a soon-to-be-released update.
- Installer crash
The installer will crash if you attempt to customise your package especially if you are planning to use Russian translation for the installer. This problem can be solved if you install a different language other than Russian and then you can change the system language to Russian after installation.
- USB Drives Cause Install to Fail
This problem can be solved by power down the device and then removing it and restarting the installation. After the system is updated, the device will be ok.
Important points to note when upgrading Fedora
Please note following points when upgrading Fedora. These points are as mentioned below:
- please ensure that you have cleared the yum cache and then you update everything and reboot by using following command:
su -c ‘yum clear all’
su -c ‘yum update’
su -c ‘/bin/rpm -Uhv for i386 For x86_64
su -c ‘/bin/rpm -Uvh for x86_64
- You should also try to disable all other repositories during the upgrade
- You should also try to delete some files in order to complete the transition.
su -c ‘yum upgrade’
Switching to Root
If you are planning to be an administrator (i.e.,root user) then you require following command for it. The command is as below:
su –login
or
su -
How To use Yum
Before we find out about how to use Yum, it is a good idea to know what is Yum. Yum is a powerful package manager and it can resolve dependencies and make installing applications a breeze. yum can also searche, remove, and list packages.
Please note following options:
-h, –help show this help message and exit
-t, –tolerant be tolerant of errors
-C –run entirely from cache, don’t update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-y answer yes for all questions
–version show Yum version and exit
–installroot=[path] set install root
–enablerepo=[repo] enable one or more repositories (wildcards allowed)
–disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], –exclude=[package]
exclude package(s) by name or glob
–obsoletes enable obsoletes processing during updates
–noplugins disable Yum plugins
–nogpgcheck disable gpg signature checking
–disableplugin=[plugin] disable plugins by name
What strengths or benefits are associated with Yum?
Yum has got following benefits or strenghts.
- Yum can search all the enabled repos and can inform you where you can obtain the package from
yum search application_name
- Yum can list all available packages from the enabled repos and tell you where you can obtain the package from
- Yum makes installation process very easy
- It is easy to list the installed rpms from the repos you have enabled
- Yum can remove an application
- Yum remove application_name
- Yum can update the system without any user interaction
- Yum can check updates for you if you are not sure if you have any updates or not
- If you want the processing speed of the packages then all you need is to install the plugin i.e., yum-presto. This plugin can be accessed by running following command:
su -c ‘yum -y install yum-presto’
However, in order to use this, you require presto repositories enabled. In order to enable the repositories, you need to edit the content of a file by running following command:
su -c ‘gedit /etc/yum.repos.d/fedora-updates-newkey.repo’
How to install System-Config-User
If you are planning to install System-conf-user then just type following command:
su -c ‘yum -y install system-config-users’
Add, edit or delete system users
If you want to add, edit or delete system users then simply follow steps as mentioned below:
- Desktop
- System Settings
- Users and Groups
- Users Tab
- Add User…/Properties/Delete
How to add/edit/delete system groups
If you would like to add, edit or delete a system group then simply go to:
- Desktop
- System Settings
- Users and Groups
- Groups Tab
- Add Group…/Properties/Delete
Automotic login into GNOME
If you would like to login automotically into GNOME, then go to:
- Desktop
- System Settings
- Login Screen
- Login Screen Setup
- General Tab -> Automatic Login -
- Login a user automatically on first bootup (Checked)
- Automatic login username: Select “system_username”
Changing files and folders permissions
If you would like to change permissions for the files or folders then simply follow steps as provided below:
- Right click on files/folders
- Properties
- Permissions Tab
- Read/Write/Execute (Checked the permissions for Owner/Group/Others)
Ownership for the files or folders
If you would like to change the ownership for the files or folders then simply type following command:
chown system_username/location_of_files_or_folders
Ownership for the files or folders group
If you would like to alter the ownership for the files/folders group then please type following command:
chgrpsystem_groupname/location_of_files_or_folders
Last update with rpm
If you would like to list your last update with rpm, the simply type in following command:
rpm -qa –last | tac
How to install repositories
There are different repositories. If you would like to install them then simply type in following commands.
- Livna
If you would like to install Livna repository, then simply type in following command:
su -c ‘rpm -i http://rpm.livna.org/livna-release-9.rpm’
How to protect your Repositories
If you would like to protect your repository, then simply type in following command:
su -c ‘yum -y install yum-protectbase’
su -c ‘perl -i -pe “s/(\[.*\])/\1\nprotect=yes/” /etc/yum.repos.d/{fedora*,livna*}’
The main reason for protecting repositories is so that you do not break the Fedora installation.
FreshRPMS
When installing the freshrpms package it is important to change the enabled section to be manually enabled.
su -c ‘rpm -i http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/7/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm’
su -c ‘gedit /etc/yum.repos.d/freshrpms.repo’
You will need to change the enabled=1 to enabled=0 This is how it will be installed.
[freshrpms]
name=Fedora Core $releasever - $basearch - Freshrpms
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=1
It needs to be changed to
[freshrpms]
name=Fedora Core $releasever - $basearch - Freshrpms
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=1
Jpackage
Please note that this configuration is specific to Fedora 9 &
Red Hat 5.00.
You need to be in the directory and get the file.
cd /etc/yum.repos.d/
su -c ‘wget http://www.jpackage.org/jpackage.repo’
You will need to edit the repository file.
su -c ‘gedit /etc/yum.repos.d/jpackage.repo’
Adjust so it matches the following repo file.
In addition, place the symbol # before every line of a repository you do not need.
Uncomment, (which means to delete the # symbol) before every line of a repository you do want or need.
In order to enable a repository, change the line from enabled=0 to enabled=1.
# Be sure to enable the distro specific repository for your distro below:
# - jpackage-fc for Fedora Core
# - jpackage-rhel for Red Hat Enterprise Linux and derivatives
[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic_1.7.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1
[jpackage17-f9]
name=JPackage 1.7 (free) for Fedora 9
baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/fedora-9/free/
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1
[jpackage50-f9]
name=JPackage 5.0 (free) for Fedora 9
baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/5.0/fedora-9/free/
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1
#[jpackage17-rhel50]
#name=JPackage 1.7 (free) for Red Hat Enterprise Linux 5.0
#baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/redhat-el-5.0/free/
#failovermethod=priority
#gpgcheck=1
#gpgkey=http://www.jpackage.org/jpackage.asc
#enabled=0
#[jpackage17-rhel50]
#name=JPackage 5.0 (free) for Red Hat Enterprise Linux 5.0
#baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/5.0/redhat-el-5.0/free/
#failovermethod=priority
#gpgcheck=1
#gpgkey=http://www.jpackage.org/jpackage.asc
#enabled=0
[jpackage-generic-nonfree]
name=JPackage (non-free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1
How to use permissions in Fedora
If you are planning to add your username to Sudo, then simply follow steps as below:
- Log in as root.
- su –login
- Now you can add the user to the sudoers file.
echo ‘your_plain_loginname_here ALL=(ALL) ALL’ >> /etc/sudoers
If you followed the instructions and advice as provided in this tutorial guide then you will be able to upgrade Fedora by using yum in a successful manner.