![]() |
|
Software Install with RPM - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html) +---- Forum: Package Management (https://www.linux-noob.com/forums/forum-28.html) +---- Thread: Software Install with RPM (/thread-797.html) |
Software Install with RPM - Dungeon-Dave - 2008-10-26 (based upon posts originally written by anyweb, kZo, Oroshi, grep420) 1. Overview RedHat invented the RedHat Package Management system to ease installation and maintanence of software. Although you can still download raw source code and manually compile applications yourself, using a package management system like RPM provides a number of advantage:
2. Basic Commands 1. Listing installed packages: rpm -qa, for example: Code: $ rpm -qa | more
basesystem-8.0-5
ethtool-3-1
mktemp-1.5-23
perl-Filter-1.30-7
tcl-8.4.9-3
ed-0.2-38
MAKEDEV-3.19-1
pyxf86config-0.3.19-4
...2. Showing information about a package: rpm -qi packagename (note that the package name, and not version needed to be specified), for example: Code: $ rpm -qi ethtool
Name : ethtool Relocations: (not relocatable)
Version : 3 Vendor: Red Hat, Inc.
Release : 1 Build Date: Thu 03 Mar 2005 11:08:26 PM GMT
Install Date: Wed 19 May 2004 01:16:31 AM BST Build Host: tweety.build.redhat.com
Group : Applications/System Source RPM: ethtool-3-1.src.rpm
Size : 134623 License: GPL
Signature : DSA/SHA1, Fri 20 May 2005 08:35:08 PM BST, Key ID b44269d04f2a6fd2
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://sourceforge.net/projects/gkernel/
Summary : Ethernet settings tool for PCI ethernet cards
Description :
This utility allows querying and changing of ethernet card settings,
such as speed, port, auto-negotiation, and PCI locations.3. Listing package contents: rpm -ql packagename (again, only name and not version number needs to be given), for example: Code: $ rpm -ql bzip2
/usr/bin/bunzip2
/usr/bin/bzcat
/usr/bin/bzcmp
/usr/bin/bzdiff
/usr/bin/bzgrep
/usr/bin/bzip2
/usr/bin/bzip2recover
/usr/bin/bzless
/usr/bin/bzmore4. Listing which package a file belongs to: rpm -qf /path/to/file - in this case, the absolute path to a filename must be specified. I have used the which command to determine the path in this case: Code: $ which nmap
/usr/bin/nmap
$ rpm -qf /usr/bin/nmap
nmap-4.53-1.0.cf.fc45. Listing contents of an uninstalled package: rpm -qlp /path/to/thisPackageHere.rpm - to see the contents of a package not yet installed, use the qlp options on the RPM file itself, eg: Code: $ rpm -qlp openssl096b-0.9.6b-6.i386.rpm
/lib/libcrypto.so.0.9.6b
/lib/libssl.so.0.9.6b
/usr/share/doc/openssl096b-0.9.6b
/usr/share/doc/openssl096b-0.9.6b/CHANGES
/usr/share/doc/openssl096b-0.9.6b/FAQ6. Installing a package: rpm -ivh /path/to/thisPackage.rpm. i=install, v=verbose, h=hash signs to show progress, eg: Code: # rpm -ivh Bastille-3.0.9-1.0.noarch.rpm
Preparing... ########################################### [100%]
1:Bastille ########################################### [100%]
#Note that root privileges or equivilent (such as sudo) are needed to install RPM packages. 7. Upgrading a package: similar to above but uses the -U option rather than -i, i.e.: rpm -Uvh /path/to/thisPackage.rpm. 8. Checking packages: rpm -V packagename. Should be silent if there are no problems. 9. Checking ALL packages: rpm -Va. Make take some time, so run this command at quiet times, but a good command to run on a regular basis for a sanity check. 10. Uninstalling package: rpm -e packagename (erase package). If other (installed) packages are dependent upon this package, RPM will refuse to erase it, citing dependency issues. For more information, use man rpm. 3. Other Considerations
|