urpmi

A brief how-to for using the urpmi utility to update your linux servers/workstations much more easily.

What is urpmi? It is the apt-get equivalent in an rpm world. Just tell it
what package you want to install, and it installs it and its dependencies for you.
Urpmi comes in several parts to help you manage all your tasks:
urpmi: use this to install named packages.
urpmi.addmedia: use this to add where you want to get your packages from.
urpmi.removemedia: undo what you just did with the above.
urpmi.update: update the list of packages in a media.

urpmi.addmedia: Want to install the latest mozilla, but it isn’t listed
in your current set of media (CDs, security updates, etc.)? Well you will need
to update your list of media to specify one that includes the latest packages.

[root@e2pc129 root]# urpmi.addmedia cooker \ ftp://speakeasy.rpmfind.net/linux/Mandrake-devel/cooker/i586/Mandrake/RPMS/ \ with ../base/hdlist.cz

That’s it the media has now been added.

urpmi: Now it’s time to get that latest and greatest mozilla package. Since we know it
is only on one media, we will specify that.

[root@e2pc129 root]# urpmi --media cooker mozilla

This will ask you if it is alright to install the list of dependencies as well,
and once you say yes the downloading and installing will begin.

urpmi.update: If you would like to stay current with all the bug fixes and security
fixes you can use urpmi.update to first update your list of available packages.

[root@e2pc129 augusts]# urpmi.update update_source

The update_source media points to where my distribution puts its security and bug
fixes. After updating your list of packages you can now get your entire system up
to date with the following:

[root@e2pc129 augusts]# urpmi --media update_source --auto-select

This will install all the latest packages and their dependencies from update_source
for you.

Notes: If you are behind a proxy there are proxy switches you can pass to all
these utilities, or if you prefer a proxy.cfg file can be created in your urpmi config
directory. My proxy.cfg is in /etc/urpmi/ and looks like this:

[root@e2pc129 urpmi]# cat proxy.cfg http_proxy=proxy.scwa.gov:3128 proxy_user=augusts:PasSwORd

Resources:
urpmi mini-HOWTO

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

4 Responses to urpmi

  1. Rick says:

    Jiminy Christmas!

    I had no idea such a tool existed. I use Redhat at work and this will come in mighty handy.

    Thanks for the tips. I’m going to try this out as soon as I get to work tomorrow.

  2. augie says:

    yeah it is pretty neat. it is the back-end for the gui update and install tools on mandrake, but i don’t think a lot people know about it on the command line.

  3. augie says:

    whoops! sorry, i didn’t realize it was so mandrake specific. the source is perl, and is available here:

    http://www.linux-mandrake.com/cooker/urpmi.html

    in source-rpm style. the other source package i think you would need is the rpmtools package:

    http://www.rpmfind.net/linux/rpm2html/search.php?query=rpmtools&submit=Search+...

    which seems to include some executables, a man page, and a perl module.

    of course i can’t say whether mandrake and other distro packages are written differently such that this still wouldn’t work.

    augie.

    p.s. i’ll email the author and see what he has to say about urpmi on other distros.

  4. Every time i configure proxy settings. they disapear from the file proxy.cfg. Not possible to upgrade the system behind a fw. Going back to CentOS.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>