|I 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
- 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
--allfiles Installs or upgrades all files in the package, regardless if they exist
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|
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.