Tuesday, November 01, 2005

[LinuxEXP] Yum on 28.8K

Good thing about YUM (aka Yellowdog Updater Modified): It provides one of the simplest ways to install and update your Linux programs without worrying much about dependency issues.

The ugly thing about YUM: The repository data would take a long time to download on dialup!

Being a dailup user isn't much fun when it comes to updating software, and the thing that initially frustrates me is that the initial YUM configuration isn't meant to be used for dialup users, which ended up me seeing a lot of YUM complaining about socket timeouts and broken downloads.

That ain't fun when every second is billed in cents.

So, what needs to be done is to make the YUM configuration a bit more dialup friendly, this can be done by setting the timeout period a little bit longer, and probably cut down the retries -- Just not to waste time retrying a server which isn't in tip-top condition. Here's what I did with my /etc/yum.conf:

cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
timeout=60
retries=1
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d


And the next thing to make it more dialup friendly is to use less repositories: as in, use only the ones that is only needed. My own preferable way of doing it is to disable every single repository by default, as in modify every single repository's configuration file in /etc/yum.repos.d folder and set enable=0. This will disable YUM from checking the repository upon execution.

Then, everytime I wanted to execute YUM, I'll enable them manually by executing the command: yum --enablerepo=[repository id] [command, e.g. install/update] [package name].

So, if you are only upgrading your Fedora packages, probably the only thing that needs to be enabled is Fedora Updates (repository id: updates-released, in file fedora-updates.repo).

Personally, I use rpm.livna.org repository for some popular open source software which is not included in Fedora Core and Fedora Extra. Since Livna is a complement of Fedora Extra, it's best to enable Fedora Extra together with Livna.

And as an alternative, which I strongly recommend, is to use a nifty tool called yumex (YUM Extender), which provides a GUI frontend to YUM. The best part of it is that it grabs the repository updates silently in the background, so you can see the repository software list instantly. And it's much more simpler to enable which repository that you want to access to.

You can grab off from Fedora Extras (try to execute this in the command line to grab it: yum -y install yumex. (Needs to enable extras [Fedora Extras] and probably updates-release [Fedora Updates])

No comments: