What is the Red Hat Network?
The Red Hat Network isn’t Red Hat’s intranet. It’s like Windows Update: a way to keep your system patched.
If you are using a Red Hat Enterprise release, you’ll want to run updates periodically to ensure your system’s safety.
If you are using Fedora, you’re using a “bleeding edge” release that will be getting frequent updates. Consider updating once a week.
Setting up Red Hat Network
In the GUI desktop, select:
Main > System Settings > Red Hat Network Configuration
You’ll enter a configuration tool that lets you select a server on the first tab.
Retrieval, verification and installation options are on the second.
The third tab, Package Exceptions, lets you exclude packages you don’t want to install or update.
Running Red Hat Update
The setup tool doesn’t actually give you a way to start updates.
For that, you have two methods.
- At the command line, type up2date, or
- Use the GUI tool at Main > System Tools > Red Hat Network, which presents you with a wizard interface.
What really happens then
If you’re working in a shell environment, up2date will present you with a text-based interface and options.
If you call up2date from the GUI, you’ll get a GUI tool.
But behind it all is up2date.
Assignment: Configuring up2date
up2date has its configuration file in /etc/sysconfig/rhn/sources.
Needless to say (I say it anyway): back up this file before changing it!
Now, comment out (by placing a # at the beginning of the lines) the lines beginning:
yum fedora-core-4 …
yum fedora-core-4-updates …
Alternate mirrors for up2date
Now replace these lines with:
yum fedora-core-4 http://mirrors.kernel.org/fedora/core/4/i386/os
yum fedora-core-4-updates http://mirrors.kernel.org/fedora/core/updates/4/i386
How up2date will act
Once it’s configured and running, Red Hat Network will manifest as an icon in your system tray, either a checkmark (you’re up to date) or a glowing red dot (new updates have been added to the Fedora mirror).
What is yum?
The name “yum” is (like many Unix names) a pseudo-acronym, in this case for the Yellow Dog Updater Modified tool.
Note that Yellow Dog is another distribution of Linux, and in fact is intended for installing Linux on Mac hardware!
Like all open-source projects, yum was returned to the community, and is now used by several other distibutions.
Assignment: Configuring yum
Your yum configuration file is:
/etc/yum.conf
The very first thing you should do is back this file up:
cp /etc/yum.conf /etc/yum.conf.bak
The default yum.conf file
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
[base]
name=Fedora Core $releasever – $basearch – Base
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
[updates-released]
name=Fedora Core $releasever – $basearch – Released Updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
Why not to use the default config?
- Everyone and their brother is using these download sites.
- It’s slow and unreliable as a consequence
- During peak hours, the server is likely to time out your connection.
Better update locations
Where should you get updates instead?
One very good choice is the mirrors at kernel.org: it’s got lots of very fast connections, it’s one of the first sites to get updated with changes, and it carries a larger range of releases (such as the AMD64 versions of Linux).
There are also third-party repositories with software from outside the Fedora project that can be used with Fedora, such as DAG and FreshRPMs.org.
Setting Up yum Configuration Files
In older Fedora Core distros, all the yum configuration information was stored in a single file: yum.conf. If you’re using an older Fedora, you will make all these edits directly into this file.
In Fedora Core 4, this configuration has been moved to the directory /etc/yum.conf.d . Each repository (marked by a name in square brackets) will go into a separate file in /etc/yum.conf.d/ , with an appropriate file name, such as dag.repo or freshrpms.repo.
For example, the file fedora.repo looks like this:
[base]
name=Fedora Core $releasever – $basearch – Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
More mods to yum.conf
You could consider modifying the [updates-released] section (or the fedora-updates.repo file) to:
[updates-released]
name=Fedora Core Mirror $releasever – $basearch – Released Updates
baseurl=http://mirrors.kernel.org/fedora/core/updates/$releasever/$basearch
Visit mirrors.kernel.org and consider how yum is using what you see.
Plus an addition
Now add a new section to yum.conf, or create a new yum configuration file called dag.repo:
[dag]
name=DAG RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
About these changes
Take note that in yum.conf or in *.repo files:
- The section heading can be called anything, as long as you enclose it in brackets: [dag].
- The name heading can be nearly anything you want to call it.
- The baseurl line is critical, and must point to a real repository.
Other repositories
Many third-party mirrors of fedora.us also provide access to wide ranges of software outside the Fedora distribution. See the HOWTO document at http://www.fedora.us/wiki/FedoraHOWTO
Also visit freshrpms.net.
Updating with yum
You can begin the update process with the command:
yum update
yum then connects with the repositories and downloads the headers for each RPM that needs to be updated. (Header files are essentially descriptions of what each RPM does.)
Then yum prompts you to choose and install updated files.
What next with yum?
Depending on your connection speed, you might want to order a pizza.
yum may update a few or very many packages, including the kernel.
If you endure many updates, reboot at the end.
If yum installs a fresh kernel, reboot to take advantage of it.
So here’s the fun part
Fedora is loaded with features, but there are lots of things it doesn’t have, like MP3 players, rippers and encoders, video players and plugins, and alternate file managers and web browsers.
Let’s try some….
Assignment: Setting up MP3 support in Fedora
Let’s say you want to install a couple of MP3 players to try out. You can install these using:
yum install alsaplayer
yum install zinf
Don’t forget to get an encoder and a disk ripper:
yum install lame
yum install grip
Adding video support
Get a couple of video (MPEG) players:
yum install xine
yum install mplayer
And an MPEG player plugin for Mozilla:
yum install mplayerplug-in
Alternate programs
Add a Norton Utilities-like file manager for KDE:
yum install krusader
And an alternate lightweight web browser:
yum install mozilla-firefox
Now you try it
Install at least two of these, then test them:
yum install alsaplayer
yum install zinf
yum install lame
yum install grip
yum install xine
yum install mplayer
yum install mplayerplug-in
yum install krusader
yum install mozilla-firefox
Helpful yum commands
yum list
List all available packages
yum check-update or yum list updates
See if updated packages are available
yum update
Update all installed packages that have new versions
yum install package [package…]
Install packages and dependencies
yum search word
Search all known package entries for word.
yum info package
Show basic info about a package
Assignment: Install Another Package Manager: APT
Debian’s Advanced Package Tools (APT) is unique in providing good GUI tools for searching for third-party applications.
To install APT (provided yum.conf is configured for DAG or FreshRPMS or Fedora.org):
yum install apt
yum install synaptic
yum install kpackage
APT tools
synaptic is an APT GUI for Gnome.
kpackage is an APT GUI for KDE.
The configuration files for APT are in /etc/apt/.
There may be one file, sources.list, or a whole directory, sources.list.d/, containing a config file for each repository.
Running APT
Update the APT database:
apt-get update
Once the update is current, run
synaptic
or
kpackage
and pick the packages you want to install.
Why would you want APT?
- APT is distribution-neutral. You can use it in practically any distro, for a uniform set of tools.
- APT accepts command-line and scripting commands (like rpm but unlike many others).
- APT lets you easily point to third-party package sites, to get support after vendors drop it, and to get updates without registering.
Dude, you’re gonna get a sourceforge!
Are you familiar with sourceforge.net? Check it out. Try:
http://apt4rpm.sourceforge.net
…which is far from the only project they support. Before you pay, look their way.
Choosing the right apt
Go to the download page and look at your options:
- You can install server packages that let you manage a large number of client updates.
- You can install the simple client package. This is the one you want.
Assignment:
Find the rpm and install it