LPI 101 - Use Red Hat Package Management (5) : (Linux Professional Institute Certification)
LPI 101 - Use Red Hat Package Management (5) : (Linux Professional Institute Certification)
c 2002 Andrew Eager, Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modied versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundationeither version 2 of the License or (at your option) any later version.
a Copyright
5-a
5-b
5-c
5-d
5-e
5-f
RPM Packages
RPM package les consist of a single compressed le much like a tarball. Package les can be sourced from: Local media (hard disk, cdrom etc) An ftp site An http site
RPM Packages
RPM package les consist of a single compressed le much like a tarball. Package les can be sourced from: Local media (hard disk, cdrom etc) An ftp site An http site Packages sourced from local media are specied using just their lename. For example: acroread-4.05-1.i686.rpm
6-a
RPM Packages
RPM package les consist of a single compressed le much like a tarball. Package les can be sourced from: Local media (hard disk, cdrom etc) An ftp site An http site Packages sourced from local media are specied using just their lename. For example: acroread-4.05-1.i686.rpm Packages sourced from ftp or http sites are specied using the following syntax: ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm
6-b
RPM Filenames
RPM Filenames use a standard naming scheme: package -version-patch.arch.rpm package - The name of the package version - The version number patch - patch number of this package arch - The architecture this package is for (i386, i586, i686, alpha, sparc) Example: kernel -2.4.9-21.i686.rpm
RPM Filenames
RPM Filenames use a standard naming scheme: package- version -patch.arch.rpm package - The name of the package version - The version number patch - patch number of this package arch - The architecture this package is for (i386, i586, i686, alpha, sparc) Example: kernel- 2.4.9 -21.i686.rpm
RPM Filenames
RPM Filenames use a standard naming scheme: package-version- patch .arch.rpm package - The name of the package version - The version number patch - patch number of this package arch - The architecture this package is for (i386, i586, i686, alpha, sparc) Example: kernel-2.4.9- 21 .i686.rpm
RPM Filenames
RPM Filenames use a standard naming scheme: package-version-patch. arch .rpm package - The name of the package version - The version number patch - patch number of this package arch - The architecture this package is for (i386, i586, i686, alpha, sparc) Example: kernel-2.4.9-21. i686 .rpm
10
11
11-a
11-b
11-c
11-d
12
13
13-a
13-b
13-c
13-d
14
15
15-a
15-b
15-c
15-d
15-e
15-f
15-g
15-h
16
17
18
18-a
18-b
18-c
18-d
18-e
19
Querying Packages
RPM can be used to query a package (either installed or not). rpm -q|--query [select-options] [query-options]
20
Querying Packages
RPM can be used to query a package (either installed or not). rpm -q|--query [select-options] [query-options] Select options : Choose what it is you want to query -a Query all installed packages. -f Query package owning FILE. -p Query an (uninstalled) package le
20-a
Querying Packages
RPM can be used to query a package (either installed or not). rpm -q|--query [select-options] [query-options] Select options : Choose what it is you want to query -a Query all installed packages. -f Query package owning FILE. -p Query an (uninstalled) package le Query options : Choose what it is you want to see from the query: -i Show all information about the package -l Show what les are contained in the package -R List packages on which this package depends
20-b
Query - Example
Give a list of all packages with kern in their name:
$ rpm -qa | grep kern kernelcfg-0.5-5 glibc-kernheaders-2.4-7.14 kernel-2.4.9-21 kernel-source-2.4.18-4
21
Query - Example
Show a list of all les in kernel-2.4.9-21
$ rpm -ql kernel-2.4.9-21 /boot/System.map-2.4.9-21 /boot/module-info-2.4.9-21 /boot/vmlinuz-2.4.9-21 ....
22
Query - Example
Show package which owns /bin/ls:
$ rpm -qf /bin/ls $ fileutils-4.1-10
23
Name : fileutils Relocations: (not relocateable) Version : 4.1 Vendor: Red Hat, Inc. Release : 10 Build Date: Mon 25 Mar 2002 12:23:22 PM E Install date: Fri 24 May 2002 02:18:08 PM EST Build Host: daffy.perf.redhat.com Group : Applications/File Source RPM: fileutils-4.1-10.src.rpm Size : 1679468 License: GPL Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> Summary : The GNU versions of common file management utilities. Description : The fileutils package includes a number of GNU versions of common and popular file management utilities. Fileutils includes the following tools: chgrp (changes a files group ownership), chown (changes a files ownership), chmod (changes a files permissions), cp (copies files), dd (copies and converts files), df (shows a filesystems disk usage), dir (gives a brief directory listing), dircolors (the setup program for the color version of the ls command), du (shows disk usage), install (copies files and sets permissions), ln (creates file links), ls (lists directory contents), mkdir (creates directories), mkfifo (creates FIFOs or named pipes), mknod (creates special files), mv (renames files), rm (removes/deletes files), rmdir (removes empty
24
25
26
The End
27