Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, our server got into a complete meltdown. Random files are missing, an fsck fixed something out of any of the remaining files...and thanks to sysadmin's faulty backups, I ended up trying to recover a month's worth of work. Yay for me.

So, I managed to get PAM and root authentication working. Initial checking looks like most utils are up and running (including GCC), however, I had to rebuild RPM's db and YUM is in a pretty bad state (RPM, by the way, completely lost knowledge existing packages).

Currently, I'm in desperate need to get services up and running, and I was thinking on first getting YUM installing stuff correctly.

So, how do I install YUM over the net with RPM?

Server specs: i386 (i686 compatible)i686, HP blade, CentOS. Oh, and how do I get the CentOS version in Linux (cli)? CentOS 5.3 (final)

share|improve this question
up vote 4 down vote accepted

Somewhere in /etc/issue the version of CentOS you're dealing with will be shown, and the arch will come from uname -m.

As for yum itself, do not use rpm to reinstall it, but rather use rpm2cpio and cpio to extract the files from the packages and then let yum fix up the rpmdb after the fact. Download the yum and centos-release packages and then:

cd /
rpm2cpio /path/to/yum-....rpm | cpio -id
rpm2cpio /path/to/centos-release-....rpm | cpio -id

Repeat until you have all the packages needed to get yum back in place.

share|improve this answer
THANKS A LOT! One thing, how do I know the right release numbers? And where do I get them form? – Christian Nov 5 '10 at 11:05
Don't be too picky about the release; you won't blow anything up if you get them slightly wrong. Get the files from . – Ignacio Vazquez-Abrams Nov 5 '10 at 11:07
Been trying to figure out how to use that link? I mean, I don't see yum or anything in that repo list? – Christian Nov 5 '10 at 11:30
Edit: found this link: is that the correct place to get them from? – Christian Nov 5 '10 at 11:31
Pick your version, go into os/, then look a few directories deeper. – Ignacio Vazquez-Abrams Nov 5 '10 at 11:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.