Previous Page | Next Page

  1. Agustin's Linux Manual
  2. System Administration
  3. About the Author
  4. Contents
  5. Administration
  6. Terminals
  7. Command Basics
  8. Root Directory
  9. Executing Commands
  10. File specs
  11. File Permission
  12. How permissions are assigned
  13. Change ownership chown
  14. Running multiple commands
  15. Killing Processes
  16. Bash configuration files
  17. VI Editor
  18. Creating path environment
  19. Midnight Commander
  20. Linuxconf Utility
  21. Networking
  22. Domain Name Service DNS
  23. Router and Gateway
  24. Adding Users
  25. User Accounts
  26. Managing Groups
  27. Mounting File System
  28. NFS Mounts
  29. Disk Quotas
  30. Run levels
  31. Linuxconf Control
  32. Mandrake Control Center
  33. Creating a Boot Disk
  34. Switching Boot Mode
  35. Hardware Configurations
  36. Printer Configuration
  37. Installing Printers
  38. Samba Printer
  39. Managing services
  40. Managing Users
  41. Program Scheduler
  42. Software Management
  43. Installing CUPS

Software management

Software managementI know how important this is to learn how to add and remove software. If you just starting to learn Linux, you are probably better off if you start learning this package manager.

The package manager is not the only way of installing software; however it makes it much easier than remembering commands. From the graphical interface (desktop), you can double click on any rpm package, and GnoRPM or KPackage will be opened to assist you with the installation.

An RPM consists of three parts: the archive name, the archive version number and the version number of the package..

Thus 'cups-serial-1.1.16-0.4mdk.i586.rpm' means: 'this package contains an archive called 'cups-serial', version 1.1.16. It is the fourth revision of this particular package. 'mdk' denotes the distribution. A package version number has been implemented to keep track of fixes and upgrades.

It is very frequent in the rpm world that you will see packages that come in this form: package-name.src.rpm; this is the source code and is of no use to you if you don't know programming. It is provided for those who want to improve it or compile.

Installing packages using commands

If you prefer doing commands this is how it is done:

Example of install:

[root@server2 root]#rpm –ivh program-name.rpm

Options:

  • pm -i package Installs a package
  • rpm -e archive Erases or uninstalls the package
  • rpm -U package Upgrades an installed package with newer version
  • rpm -v package Verbose mode

Alternatively, you can achieve the installation

[root@server2 root]# rpm -i cups-serial-1.1.16-0.4mdk.i586.rpm

Example of uninstall

[root@server2 root]# rpm -e cups-serial-1.1.16-0.4mdk.i586.rpm

Other common uses:

rpm -i cups*

rpm -e *gtk*
error: package *gtk* is not installed

There are other special modifiers during an installation,

'--test' and '--verbose' (or '-v').

'--test' only executes the command to test the package.

'--verbose' ('-v') reports messages on the screen. This is useful in case of errors. It can be used together with the '--test' modifier. Adding another '-v' ('-vv') increases the level of verbosity even more.

--force   Same as using –replacepkgs,--replacefile, and oldpackage.

--nodeps     Used, generally on special situations, when you must install without dependencies.

--allfiles      Installs or upgrades all files in the package, regardless if they exist

Querying

root privileges are not a requirement for this:

If you are querying not-installed packages, add the '-p' option to the '-q' option.

  • rpm -q archive
  • queries installed package name and version:
  • rpm -qp package
  • performs the same on package which isn't installed
  • rpm -qi archive
  • informs about the package, who packaged it when and where, when it has been installed, its size etc.
  • rpm -qpi package
  • query a not-installed package
  • rpm -ql archive
  • lists all files in an installed package
  • rpm -qd archive
  • lists all documentation of installed package
  • rpm -qa
  • Lists all installed packages. Can be used in combination with 'grep'
  • rpm -qa --last
  • lists installed packages sorted by their installation date
  • rpm -q --changelog archive
  • Lists changes applied to a package by its maintainer(s).
  • rpm -qf file
  • tells you which installed package file belongs to
    Table 4.1

    For more information on rpm, type man rpm at your command line.

    OK, OK …if you don't feel like typing; then run your control center and click on the package manager.