NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
Home / News / Linux / Mandriva Tips and Tricks

Mandriva Tips and Tricks


How to Configure and Use URPMI

Explaining Mandriva's specific tool, URPMI.

By Mihai Marinof, Linux Editor

7th of March 2007, 10:47 GMT

Adjust text size:


One of the tools that made modern Linux so much easier to use is - without a doubt - the package manager. A package manager enables you to install a piece of software, a driver or a library in a matter of seconds. The secret consists in the way software packages are distributed via repositories: they are already compiled and ready to use. This way, you don't have to go through the lengthy process of downloading the source code archive, compile and install it. Nowadays, every modern Linux distribution has its own package manager, either specific or borrowed, it doesn't matter. It's there and it works. Just like Fedora has yum and Ubuntu has apt-get, Mandriva has URPMI. This tool allows a better and easier package management and helps you find a way out of the dependency problems many inexperienced users complain about during the specific Linux install process, installation from sources. This guide will explain the most used functions of URPMI and how to use them efficiently.

urpmi.addmedia

This command enables you to add urpmi repositories. The Mandriva Linux ftp mirrors must contain:

. main, which contains most programs
. contrib, which contains optional programs
. update, which fixes program's security and functionality problems

A lot of mirrors and hdlists for the mentioned packages are available on the Internet; however, the best way is to use forms like these ones: EasyURPMI , smart-URPMI or Mandriva Module Finder. Choosing other media than the tree mentioned is totally up to you, but at least read the info for each additional media you're planning to add just to make sure it's what you really want or need.

After following the wizard on one of the websites, you will be presented with an output like:
CODE
urpmi.addmedia main ftp://mirr.or/MandrivaLinux/official/2007.0/i586/media/main/release with media_info/hdlist.cz
urpmi.addmedia contrib ftp://mirr.or/MandrivaLinux/official/2007.0/i586/media/contrib/release with media_info/hdlist.cz

Simply open a terminal, switch to user root ($ su -) and copy/paste each line, one at a time. Moreover, if you have added a few custom or unknown repositories, check the urmi.removemedia command to see how to clear the repositories list.


urpmi.removemedia

After using the repositories for a while, it's possible to dislike one of them because of the software it's offering or the low connection it's on. Therefore, to remove a media, use the command:
CODE
# urpmi.removemedia media-name

Moreover, if you're adding the sources for the second, third or 63rd time, it's recommended to use the following command before adding the sources so you'll have a nice and clean URPMI setup:
CODE
# urpmi.removemedia -a


urpmi.update

This command will update the media sources and fetch the latest version available of your installed programs. The urpm.update command should be used right after a fresh Mandriva installation but also, once in a while, using a cron job.

To update ALL media:
CODE
# urpmi.update -a

To add the command in a cron job:

- Make sure you're logged in as root.
- Create a new file:
CODE
# vi /etc/cron.daily/auto-update

- Paste the following lines in it and save it:
CODE
#!/bin/bash
urpmi.update -a
urpmi urpmi
urpmi --auto --auto-select

(if you don't know how to use vi, after you've ran the command, press the INSERT key, to paste the lines press Shift INSERT, press ESCAPE, to write file to disk press Shift ; then press wq and ENTER)

- Now make the file executable:
CODE
# chmod 755 /etc/cron.daily/auto-update

Other useful commands:

- Update all packages but don't remove any, just show what went wrong:
CODE
# urpmi --keep --auto --auto-select

- Search for what needs to be updated and prompt for yes or no:
CODE
# urpmi --auto-select


urpmi

This command is the main package management command which is used to install the packages. It will search through the sources for the package you specified and will prompt you for any additional dependencies it needs. If you accept, the program and its eventual dependencies will be automatically downloaded and installed. You can specify one or more packages to be installed:
CODE
# urpmi ncftp

or

CODE
# urpmi wget elinks gaim liferea


urpme

This is the command used for removing the packages, including all their dependencies. The package.name must have one of the forms name, name-version, name-version-release, or name-version-release.architecture. You will also have the change to abort the process.
CODE
# urpme gaim

You can also specify package names more broadly. For example, you can uninstall all programs that start with gnome- (not recommended, though).
CODE
# urpme -a kde


urpmf

This command is used to find any files you might want. For example, when compiling a source package, it's possible to receive a dependency error and the compilation to abort with message libfile.h missing. You can install that file using urpmf:
CODE
# urpmf libfile.h


urpmq

This command is used to query the RPM database. You can use this command to find various info about the packages you have installed. There's also the --fuzzy option which will return the default package, as well as other packages which include the same name also:
CODE
# urpmq kernel --fuzzy

will output:
kernel-2.6.21
kernel-source-2.6.21
kernel-legacy-2.6.21

TAGS:

mandriva | urpmi | howto | guide | tutorial


Rating:
Fair (2.5/5) 8 vote(s) so far    

Read by 4,798 user(s) | Add comment | Link to this article
Subscribe to news | Print article | Send to friend

© Copyright 2001-2008 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


Install Nvidia and ATI Drivers on Mandriva 2007.0

Linux Mandriva 2006, Ready to Install

Mandriva Linux 2007 Allows You to Play Windows Games!

Mandriva Flash Available

Mandriva Metisse and Gaming DVD Editions

Mandriva 2007.1 Beta 1 Released

Mandriva Linux 2007 Installation Guide

User opinions:

No user comments yet.
Be the first to express your opinion using the form below!

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 






SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM