Weekly Edition Return to the Distributions pageSponsored link Serve your customers, not your servers, with VERIO Linux VPS. Full-access test-drive here. |
A Quick Reference Guide to urpmi
"urpmi", sometimes referred to as "urpm" or "User RPM", was first
introduced into Mandrake Linux 7.0, released in January 2000. It was meant
to be a powerful front-end to the "rpm" command. It came with dependency
resolution, search and other functions similar to the Debian's "apt" tool,
as well as a honorable intention to the end all RPM-related headaches. But
despite urpmi being Free Software, it did not find its way into any other
distribution, and even those that were originally derived from Mandrake
(such as Alt Linux or PCLinuxOS) have been quick to replace urpmi with one
of the apt ports for RPM-based distributions. Nevertheless, Mandrake's
effort at making RPMs more digestible and pleasant to use deserves
praise. Here is a quick rundown on the purpose of urpmi, its commands and
functions.
Issuing a urpmi command performs several tasks. Firstly, it checks whether the relevant package has been installed. Secondly, it determines whether the package exists in the database of installable packages. Thirdly, it retrieves all packages, which the package in question depends on, marks them for installation and presents them to the user for approval. Lastly, it installs the package from a specified source, such as a CD, another machine on the local network, or a remote FTP/HTTP server. Besides these basic functions, urpmi is also capable of upgrading or removing packages, displaying information about packages and searching the package database. All of the above can be accomplished either on the command line or in graphical environment. This is the list of commands available for manipulating RPM packages under Mandrake Linux:
There are several urpmi configuration files; some of the more important among them are:
Setting up package sources for retrieval via the Internet is very simple with Mandrake's graphical configuration tools, but the command line can do the job equally well. First, let's retrieve the list of sources from urpmi.cfg: urpmq --list-mediaNow we can add new sources from the official Mandrake repositories, as well as the ever useful PLF repository. This can be accomplished with the following commands:
urpmi.addmedia main ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS \
with ../base/hdlist.cz
urpmi.addmedia contrib ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS2
urpmi.addmedia jpackage ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS3
urpmi.addmedia --update updates ftp://[...]/mandrake/updates/9.2/RPMS \
with ../base/hdlist.cz
urpmi.addmedia plf ftp://knight.zarb.org/pub/plf/mandrake/9.2 with hdlist.cz
Those who prefer to be on the very bleeding edge of Mandrake development might
want to track the "Cooker", or Mandrake's development branch:
urpmi.addmedia cooker-main \
ftp://[...]/mandrake-devel/cooker/i586/Mandrake/RPMS with ../base/hdlist.cz
urpmi.addmedia cooker-contrib ftp://[...]/mandrake-devel/contrib/i586
Installing a new package or upgrading an existing package is a simple matter of issuing a urpmi <package_name> command, while uninstalling is done with a urpme <package_name> command. In cases where the specified <package_name> doesn't exist, urpmi will attempt to find a package with a similar name, so even typing errors are taken care of. An even better option is to install the "bash-completion" package, which is capable of suggesting package names following the urpmi command and the first few letters of a package name. Upgrading an entire Mandrake Linux system can be accomplished with the following two commands: urpmi.update -a urpmi --auto --auto-selectThe first of the above commands will get the list of available packages for upgrade, while the second one will download and upgrade all installed packages to their latest versions. The RPM packages are downloaded to the /var/cache/urpmi/rpms directory. As mentioned earlier, urpmi also provides a set of powerful search commands. Here are some useful examples:
It goes without saying that standard rpm commands, such as rpm -qa can be executed as well. In conjunction with the various urpm* commands, they provide a powerful set of tools for managing software on Mandrake Linux. (Log in to post comments)
Easy Urpmi Posted Jan 29, 2004 2:36 UTC (Thu) by Algol (subscriber, #2681) [Link] An easy way to finding local mirrors and generating the syntax to get themadded is http://urpmi.org/easyurpmi/
Some more urpmi tricks: Posted Jan 29, 2004 13:54 UTC (Thu) by juanjux (guest, #11652) [Link] Installing some packages from cooker without upgrading the whole stabledistribution: I usually keep the Cooker media added to my sources, so I can install a package from the "unstable" Mandrake distribution if I need to (for example I currently have KDE 3.2 and kernel 2.6 installed from cooker). But I don't want my entire distribution to upgrade to cooker, so I have two alias defined in my .bashrc: alias urpmi='/usr/sbin/urpmi --excludemedia cooker --wget --noclean' alias urpmico='/usr/sbin/urpmi --media cooker --wget --noclean' The first command don't install things from cooker and the other is the one I use to install packages (and his deps) from cooker. Also, you have to take care to don't install cooker packages if you're using the GUI tools (in the description on the right there is a field called "media"). The --wget parameter tells urpmi to use wget for downloading of packages instead of curl, and I have a continue = on opcion enabled in my /etc/wgetrc so I can freely interrupt a package download by urpmi (say, OpenOffice.org) and when I issue the command again it doesn't starts downloading the entire package again. The --noclean parameter tells urpmi to don't delete the package in /var/cache/urpmi/rpms after they've been installed, so I can copy them to my laptop and upgrade that too without downloading (again) all the packages. But then, you've to remember to delete the packages there from time to time. Having being a Debian user for 8 years (I still use it on the second computer in my home) I doesn't miss apt-get too much in my Mandrake except for two details of urpmi: * There is not an option for urpmq to search not only in package names but also in package descriptions, like apt-cache search does. * It informs you of how many MB the packages you're about to upgrade or install are going to use, but it doesn't says how many MB you'll have to download in total (I've discovered that this is usually about 50% of the first) or what is the ETA for finishing all the downloads. apt-get gives you this information.
Some more urpmi tricks: Posted Jan 29, 2004 20:42 UTC (Thu) by Frej (subscriber, #4165) [Link] urpmf --summary should search in descriptions
A Quick Reference Guide to urpmi Posted Jan 31, 2004 0:58 UTC (Sat) by wolfrider (guest, #3105) [Link] --Thanks Ladislav. :) Another excellent article.
|
Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.