Help - Search - Members - Calendar
Full Version: How-to use yum to keep your servers up to date
The Planet Forums > Operating Systems > Red Hat Linux > Red Hat HOWTOs
dynamicnet
Greetings:

While the future of Fedora for security updates to RedHat 7.3, 8, and 9 is uncertain, at present you can use Yum along side Fedora Legacy to keep your RedHat servers up to date.

IMPORTANT: H-Sphere users, please read http://www.psoft.net/HSdocumentation/sysad...in/up2date.html and http://www.psoft.net/HSdocumentation/sysad...in/apt-get.html

The software not to update still applies for H-Sphere users!!!

Here's how:

1. Check if you have an older version of yum installed.

rpm -qa | grep yum

If you do have it installed (make sure your server is backed up), then do

rpm -ev yum

2. Install Fedora's RedHat 7.3 version for yum.

mkdir -p /usr/local/src/rpm
cd /usr/local/src/rpm
wget http://download.fedoralegacy.org/redhat/7....gacy.noarch.rpm
rpm -ivh yum-1.0.3-6.0.7.x.legacy.noarch.rpm


3. Now edit /etc/yum.conf

NOTE: If your installation talked about using /etc/yum.conf.rpmnew then copy taht file over top of /etc/yum.conf

Change every instance of "gpgcheck=1" to "gpgcheck=0"

Save the file.

4. Now run

/usr/bin/yum check-update

NOTE: This will not update anything. It just checks to see what updates are needed to bring the machine up to date.

5. Now you may see something like the following:

getting /var/cache/yum/base/headers/mtr-1-0.49-1.i386.hdr
getting /var/cache/yum/base/headers/gimp-devel-1-1.2.3-4.i386.hdr
getting /var/cache/yum/updates/headers/arts-devel-7-1.0.5a-0.73.0.i386.hdr
getting /var/cache/yum/updates/headers/kon2-0-0.3.9b-14.7.3.1.i386.hdr
getting /var/cache/yum/base/headers/xosview-0-1.7.3-10.i386.hdr
getting /var/cache/yum/base/headers/pango-0-1.0.1-1.i386.hdr
Name Arch Version
--------------------------------------------------------------------------------
aspell i386 0.33.7.1-9


To actuall upgrade aspell, type in the following command

/usr/bin/yum update aspell


NOTE: While, I’ve not yet used Yum to upgrade a kernel, a friend of mine has successfully updated their RedHat Linux Kernel with yum through Fedora Legacy and rebooted without a hitch.


Useful yum commands:

yum check-update
See if there are updated packages available.

yum update
Update all installed packages that have a newer version available.

yum install
Install specific package(s) (and its dependencies, if missing any).

yum search
Search all known packages entries (descriptions etc) for .

yum info
Show basic information about a package.


Useful Links:

http://www.phy.duke.edu/~rgb/General/yum_H...OWTO/index.html

http://www.hut.fi/~tkarvine/yum-package-manager.html

http://www.yellowdoglinux.com/support/solu...neral/yum.shtml
orca
Works for Cpanel, too. I posted it a few days ago. Actually for upgrading RH9 to Fedora Core 1.
Griffith
Does this mean I can use these rpms on my RH7.3 servers? Many who have tested this?
dynamicnet
Greetings:

We've been using it to keep 13 RedHat 7.2 and RedHat 7.3 servers up to date without a hitch including Kernel updates.

Thank you.
dynamicnet
Greetings:

FYI ==> http://www.internetnews.com/dev-news/artic...cle.php/3305251

Thank you.
henker
QUOTE
Originally posted by dynamicnet
of /etc/yum.conf
Change every instance of "gpgcheck=1" to "gpgcheck=0"
[/B]


I wouldn't recommend gpgcheck=0 but rather import the gpg keys from /usr/share/doc/yum-1.0.3 or whatever yum version you use.
*If* you use this on an Ensim box, make sure you don't have yum started automatically in combination with /etc/cron.daily/yum to avoid daily automatic updates.
dynamicnet
Greetings:

I could me me, and a half dozen others... but we did the key importants.

gpg listings show the keys; we even added the key on the Fedora Legacy site... no luck.

The gpgcheck=0 was suggested by the people on the Fedora Legacy and Yum mailing list.

If you do get the keys to work; let me know the key source (the directory wasn't it for us).

Thank you.
henker
That's strange, I just imported Fedora-GPG-KEY Fedora-Legacy-GPG-KEY and RPM-GPG-KEY from /usr/share/doc/yum-1.0.3 as root.
kyotou
QUOTE
Originally posted by dynamicnet
Greetings:

I could me me, and a half dozen others... but we did the key importants.

gpg listings show the keys; we even added the key on the Fedora Legacy site... no luck.

The gpgcheck=0 was suggested by the people on the Fedora Legacy and Yum mailing list.

If you do get the keys to work; let me know the key source (the directory wasn't it for us).

Thank you.

I've downloaded and imported the key here and it didn't give any error.

Great How-To btw. Thanks. icon_biggrin.gif
ElectrifiedPro
If you could, please post a step by step how to for updating the kernel with yum.

ps. i did the upgrade and let it dl the source and a smp kernel, and then told lilo to " lilo -R linux " since it renamed the new kernel to linux and the old one to linux.bak but upon reboot it panic'ed and since the box is remote idont know how to get the errors or even where to start. But the box is backup with the old kernel since i changed it to the default one.
so any help would be nice icon_smile.gif


- Sal
http://www.ElectrifiedPro.com
dynamicnet
Greetings:

Edit /etc/yum.conf

Comment (place a "#" before) the "exclude" statement (there should be only one exclude statement towards the top. It will deal with excluding the kernel.

Then do

/usr/bin/yum update kernel

It will automatically update /etc/lilo.conf.

Then reboot.

Thank you.
propcgamer
I keep getting .conflict between kernel and bcm5820
im running: 2.4.9-34 red hat 7.2 ensim 3.1
dynamicnet
Greetings:

If you read the start of the thread --> RedHat 7.3, 8, and 9.

I've not tested this on 7.2.

Thank you.
paulz
When I run Now run

/usr/bin/yum check-update

I get the following error:

Error getting file http://download.fedoralegacy.org/redhat/7.....0.1-9.i386.hdr
[Errno 6] ERROR: Url Return no Content-Length - something is wrong


Help Appreciated
paulz
Ignore my last post, tried it one last time and it worked!

Sorry
dynamicnet
Greetings:

Try clearing out /var/cache/yum

cd /var/cache/yum
rm -fR *

Then re-run check-update.

Thank you.

P.S. I've only seen that happen on one other server; and in their case, their network routes table was damaged.
freddo
QUOTE
Originally posted by paulz
When I run Now run

/usr/bin/yum check-update

I get the following error:

Error getting file http://download.fedoralegacy.org/redhat/7.....0.1-9.i386.hdr
[Errno 6] ERROR: Url Return no Content-Length  - something is wrong


Help Appreciated
It's happened to me quite a few times. It's to do with not being able to reach fedora-legacy (maybe cause they are busy). Just keep trying eventually all the headers get thru. One time it took me 20 goes...
ljprevo
QUOTE
Originally posted by dynamicnet
Greetings:

Edit /etc/yum.conf

Comment (place a "#" before) the "exclude" statement (there should be only one exclude statement towards the top.  It will deal with excluding the kernel.

Then do

/usr/bin/yum update kernel

It will automatically update /etc/lilo.conf.

Then reboot.

Thank you.


I followed this exactly and now after I run /usr/bin/yum check-update it says

kernel-source i386 2.4.20-28.7

needs updating.
TheVoice
how do I update to the 2.6 kernel using yum on rh9?
barryj
I downloaded and installed yum for RH 7.3 and when I run the 'check update' I get the error

Error getting file http://download.fedoralegacy.org/redhat/7....-0.1-6.i386.hdr
[Errno 6] ERROR: Url Return no Content-Length - something is wrong

I have tried the -fR * from the cache/yum directory, rerun the check update and still get the message. This is on RH 7.3 any ideas?

FORGET THIS POST, LIKE FREDDO SAYS, I'LL JUST KEEP TRYING
dynamicnet
Greetings:

RE: RedHat 9.0

1. RedHat 9 is still supported by RedHat.

2. http://download.fedoralegacy.org/redhat/ only shows utils for 7.2, 7.3, and 8.0.

3. See http://linux.duke.edu/projects/yum/download.ptml for a Yum version that should work with 9.0.

However, I don't think Fedora Legacy is dealing with RedHat 9; however, Yum 2.x should be able to get updates from the RedHat update network without adjustments.

Also, yum will only update what is in a given repository that is listed within /etc/yum.conf

If a kernel upgrade is not listed, then do it by hand et all; there are how to's all over the place.

Re: "ERROR: Url Return no Content-Length - something is wrong"

I've seen that on bard hard drives or when routing tables on the server are goofed up. Check with Ev1server support.

Thank you.
freddo
QUOTE
Originally posted by dynamicnet

I've seen that on bard hard drives or when routing tables on the server are goofed up.  Check with Ev1server support.

Thank you.
If that were the case the headers would never get thru. As I said before you just have to keep trying. Sometimes you get all the headers in one go, sometimes it can take 20 goes.
Griffith
Is it possible to just download the updates? So that I can manually install them?
arhs
Can any one post how to upgrade kernel on Fedora Core 1?
Err0r
Fedora uses the same up2date system as RHEL so you can update your system on that (I used it 2 days ago on a friend's machine). Kernel upgrades for fedora would use the same method as a RHEL kernel so you can use that how-to
benn93z28
Is this fine for servers RH with Ensim installed? (I have Ensim 3.5.21-16)

Thanks in advance, and I'm glad they made an update script for linux dummies such as myself.

--Benjamin
dynamicnet
Greetings:

Yes, though you do need to confirm with Ensim as to what packages should no be upgraded.

Thank you.
mang0head
I've just installed yum, but i'm a little confused as to what i should be upgrading.

I've run the command " /usr/bin/yum check-update "

a bunch of "getting .." lines show up

eg.

getting /var/cache/yum/base/headers/gnomemeeting-0-0.85.1-3.i386.hdr
getting /var/cache/yum/updates/headers/epic-4-1.0.1-15.7.x.i386.hdr
getting /var/cache/yum/base/headers/libxml-devel-1-1.8.17-3.i386.hdr
getting /var/cache/yum/base/headers/dmalloc-0-4.8.1-6.i386.hdr
getting /var/cache/yum/base/headers/gnome-libs-devel-1-1.4.1.2.90-14.i386.hdr
getting /var/cache/yum/base/headers/freeciv-0-1.12.0-1.i386.hdr
getting /var/cache/yum/base/headers/perl-BSD-Resource-0-1.14-11.i386.hdr
getting /var/cache/yum/base/headers/x3270-text-0-3.2.18-2.i386.hdr
getting /var/cache/yum/updates/headers/samba-client-0-2.2.12-0.73.3.legacy.i386.hdr
getting /var/cache/yum/base/headers/mtr-1-0.49-1.i386.hdr
getting /var/cache/yum/base/headers/gimp-devel-1-1.2.3-4.i386.hdr
getting /var/cache/yum/updates/headers/arts-devel-7-1.0.5a-0.73.0.i386.hdr
getting /var/cache/yum/updates/headers/kon2-0-0.3.9b-14.7.3.1.i386.hdr
Name Arch Version
--------------------------------------------------------------------------------
php i386 4.1.2-7.3.16.legacy
php-devel i386 4.1.2-7.3.16.legacy
php-imap i386 4.1.2-7.3.16.legacy
php-ldap i386 4.1.2-7.3.16.legacy
php-mysql i386 4.1.2-7.3.16.legacy
php-pgsql i386 4.1.2-7.3.16.legacy
rsync i386 2.5.7-2.legacy.7x



Which one of these do i upgrade? just the ones listed under the Name/Arch/Version list? eg. php, php-devel, rsync ?

I'm running redhat 7.3 with Cpanel.

thanks for your help!
dynamicnet
Greetings:

It really depends on the control panel software you use and what the control panel vendor wants you to exclude from updates.

Thank you.
kamihacker
QUOTE (mang0head)
I've just installed yum, but i'm a little confused as to what i should be upgrading.

I've run the command  " /usr/bin/yum check-update "

a bunch of "getting .." lines show up  

eg.

getting /var/cache/yum/base/headers/gnomemeeting-0-0.85.1-3.i386.hdr
getting /var/cache/yum/updates/headers/epic-4-1.0.1-15.7.x.i386.hdr
getting /var/cache/yum/base/headers/libxml-devel-1-1.8.17-3.i386.hdr
getting /var/cache/yum/base/headers/dmalloc-0-4.8.1-6.i386.hdr
getting /var/cache/yum/base/headers/gnome-libs-devel-1-1.4.1.2.90-14.i386.hdr
getting /var/cache/yum/base/headers/freeciv-0-1.12.0-1.i386.hdr
getting /var/cache/yum/base/headers/perl-BSD-Resource-0-1.14-11.i386.hdr
getting /var/cache/yum/base/headers/x3270-text-0-3.2.18-2.i386.hdr
getting /var/cache/yum/updates/headers/samba-client-0-2.2.12-0.73.3.legacy.i386.hdr
getting /var/cache/yum/base/headers/mtr-1-0.49-1.i386.hdr
getting /var/cache/yum/base/headers/gimp-devel-1-1.2.3-4.i386.hdr
getting /var/cache/yum/updates/headers/arts-devel-7-1.0.5a-0.73.0.i386.hdr
getting /var/cache/yum/updates/headers/kon2-0-0.3.9b-14.7.3.1.i386.hdr
Name                                     Arch       Version
--------------------------------------------------------------------------------
php                                      i386       4.1.2-7.3.16.legacy
php-devel                                i386       4.1.2-7.3.16.legacy
php-imap                                 i386       4.1.2-7.3.16.legacy
php-ldap                                 i386       4.1.2-7.3.16.legacy
php-mysql                                i386       4.1.2-7.3.16.legacy
php-pgsql                                i386       4.1.2-7.3.16.legacy
rsync                                    i386       2.5.7-2.legacy.7x
 


Which one of these do i upgrade? just the ones listed under the Name/Arch/Version list? eg. php, php-devel, rsync ?

I'm running redhat 7.3 with Cpanel.

thanks for your help!

check the release notes for your version of ensim

things I'd keep out would be

apache, php, perl, python, sendmail and kernel for the sake of doing that last one manually

regards
samasa
I tried to make a update but I received this errors:

[root@ensim ~]# /usr/bin/yum check-update
Config Error: Insufficient repository configuration. No repositories Found/Enabled. Aborting.
[root@ensim ~]#


Any idea why?


Thanks for you help..!!
cogsprocket
I'm getting a completely different error.

Upon running
/usr/bin/yum check-update

I get the result:

Traceback (most recent call last):
File "/usr/bin/yum", line 22, in ?
import yummmain
ImportError: Bad magic number in /usr/share/yum/yummain.pyc

From what I can glean from the net this is probably a python version issue. I'm putting the error here for posterity.
skywalllker
Hi guys, I tried to update my kernel using yum but it doesn't work. I execute this command:

yum update kernel

and it return:

Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update


My current kernel is 2.6.18-53.el5PAE

When I execute:

yum check-update | grep -i kernel

it return:

kernel-PAE.i686 2.6.18-128.1.6.el5 rhel-i386-server-5
kernel-PAE-devel.i686 2.6.18-128.1.6.el5 rhel-i386-server-5
kernel-headers.i386 2.6.18-128.1.6.el5 rhel-i386-server-5


The newer kernel (2.6.18-128.1.6.el5) is available but I have no idea why I can't update this on my server.

Really appreciate any feedback over this matter. Thanks in advance!
Tomy Durden
I always suggest using 'yum install kernel' so you can fall back to the older kernel if it fails. Try this.

QUOTE (skywalllker @ Apr 15 2009, 09:27 PM) *
Hi guys, I tried to update my kernel using yum but it doesn't work. I execute this command:

yum update kernel

and it return:

Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update


My current kernel is 2.6.18-53.el5PAE

When I execute:

yum check-update | grep -i kernel

it return:

kernel-PAE.i686 2.6.18-128.1.6.el5 rhel-i386-server-5
kernel-PAE-devel.i686 2.6.18-128.1.6.el5 rhel-i386-server-5
kernel-headers.i386 2.6.18-128.1.6.el5 rhel-i386-server-5


The newer kernel (2.6.18-128.1.6.el5) is available but I have no idea why I can't update this on my server.

Really appreciate any feedback over this matter. Thanks in advance!
skywalllker
QUOTE (Tomy Durden @ Apr 16 2009, 12:01 PM) *
I always suggest using 'yum install kernel' so you can fall back to the older kernel if it fails. Try this.


Thanks for the advise.

I execute commad below:

yum install kernel-PAE

I never thought 'yum install kernel' are not enough to do the job.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.