SlideShare a Scribd company logo
1 of 16
RPM: The RPM Package
Manager
RPM (RPM Package Manager; www.rpm.org) works only with software packages built for
processing by RPM; it can download, install, uninstall, upgrade, query, and verify RPM packages.
The files that hold these packages have a filename extension of .rpm. RPM uses the local RPM
installation database to track the locations where software packages are installed, the versions
of the installed packages, and the dependencies between the packages.
RPM uses the Berkeley Database (Berkeley DB or BDB) and stores the database files in
/var/lib/rpm. RPM forms the basis for yum: yum finds packages, downloads them from
repositories, and then calls RPM to install/upgrade/remove the packages.
Querying Packages and Files
The following rpm command displays a list of one-line summaries of all packages
installed on the system:
$ rpm -qa
mtools-4.0.15-2.fc15.i686
iwl6000-firmware-9.221.4.1-2.fc15.noarch
gnome-desktop3-2.91.93-1.fc15.i686
libmusicbrainz3-3.0.3-3.fc15.i686
dejavu-fonts-common-2.32-2.fc15.noarch
pptp-1.7.2-12.fc15.i686
The –q option queries the package database; the –a option specifies all packages.
Without –a, –q takes the name of a package as an argument and displays information
about that package only. For instance, rpm –q ypserv tells you whether the ypserv
package is installed and, if so, which version is installed. Use the –ql options to list the
files in a package.
$ rpm -q ypserv
package ypserv is not installed
$ rpm -ql logrotate
/etc/cron.daily/logrotate
/etc/logrotate.conf
/etc/logrotate.d
/usr/sbin/logrotate
/usr/share/doc/logrotate-3.7.9
/usr/share/doc/logrotate-3.7.9/CHANGES
/usr/share/doc/logrotate-3.7.9/COPYING
/usr/share/man/man5/logrotate.conf.5.gz
/usr/share/man/man8/logrotate.8.gz
/var/lib/logrotate.status
With the –qi options, rpm displays information about a package:
$ rpm -qi logrotate
Name : logrotate
Version : 3.7.9
Release : 8.fc15
Architecture: i686
Install Date: Wed 23 Mar 2011 05:37:59 PM PDT
Group : System Environment/Base
Size : 84226
License : GPL+
Signature : RSA/SHA256, Mon 21 Mar 2011 03:05:16 PM PDT, Key ID b4ebf579069c8460
Source RPM : logrotate-3.7.9-8.fc15.src.rpm
Build Date : Mon 21 Mar 2011 06:28:12 AM PDT
Build Host : x86-06.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager : Fedora Project
Vendor : Fedora Project
Summary : Rotates, compresses, removes and mails system log files
Description :
The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files. Logrotate
allows for the automatic rotation compression, removal and mailing of
log files. Logrotate can be set to handle a log file daily, weekly,
monthly or when the log file gets to a certain size. Normally,
logrotate runs as a daily cron job.
Install the logrotate package if you need a utility to deal with the
log files on your system.
You can use the –qf options to determine which package a file belongs to; it works
with installed packages only. Use the yum whatprovides command (page 537) to
search repositories for the same information. The following command shows that
more is part of the util-linux package:
$ rpm -qf /bin/more
util-linux-2.19-3.fc15.i686
Include the –p option with other options to query an uninstalled RPM package file:
$ ls ypser*
ypserv-2.24-2.fc15.i686.rpm
$ rpm -qip ypserv-2.24-2.fc15.i686.rpm
Name : ypserv
Version : 2.24
Release : 2.fc15
Installing, Upgrading, and Removing
Packages
Although it is frequently easier to use yum or gpk-application, you can use rpm to download,
install, upgrade, or remove a package. Run rpm with root privileges; although you can run rpm
as a nonprivileged user, you will not have permission to write to the necessary directories during
an install or uninstall, and the procedure will fail. During a query, you do not need to work with
root privileges, so you can and should work as a nonprivileged user. Give the –U (upgrade)
option, followed
by the name of the file that contains the RPM version of the package you want to install. The –U
option upgrades existing packages and installs new packages (as though you had used the –i
option). For kernels, use –i (not –U) to leave the old kernel intact when you install a new kernel.
Add the –v (verbose) option to display more information about what is happening and the –h (or
––hash) option to display hash marks as the package is unpacked and installed.
Installing a package For example, the following command installs the samba package on the local
system:
# ls samba*
samba-3.6.0-64pre1.fc15.1.i686.rpm
# rpm -Uvh samba-3.6.0-64pre1.fc15.1.i686.rpm
Preparing... ########################################### [100%]
1:samba ########################################### [100%]
When you install a package, the rpm file must be in the working directory, or you
must use a pathname that points to the rpm file. If you specify an FTP or HTTP
URL, rpm will download the package before installing it (but it will not download
or install dependencies):
# rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/updates/15/i386/bind-9.8.0-5.P2.fc15.i686.rpm
Removing a
package
The following command removes the samba package. You can give the command
from any directory:
# rpm -e samba
error: Failed dependencies:
samba is needed by (installed) system-config-samba-1.2.91-2.fc15.noarch
When you run this command, rpm reports that another package, system-configsamba,
is dependent on the samba package. To remove the samba package, you have
two choices: You can ignore the dependency by including the rpm ––nodeps option or
you can remove the dependent package and then remove the samba package.
# rpm -e system-config-samba
# rpm -e samba
If you remove the samba package without removing the package that is dependent
on it, the utilities within the dependent package will not work. In the preceding
example, the system-config-samba utility will not work.
When you use rpm to remove a package, rpm queries package database to find the
information it needs to uninstall the package and removes links, unloads device drivers,
and stops daemons as necessary. Refer to the rpm man page for more rpm options.
Installing a Linux Kernel Binary
The following steps install a Linux kernel binary from an RPM package. If you simply
want to install the latest kernel for the local system, give the command yum
install kernel instead. Refer to Chapter 15 when you want to configure and rebuild
a kernel from source files, rather than installing a new, prebuilt kernel binary.
1. Run rpm with the –i option to install the new kernel. Do not use the –U
option: You are installing a new kernel that has a different name than the
old kernel; you are not upgrading the existing kernel.
2. Make sure the new kernel works before you remove the old kernel. To verify the new kernel
works, reboot the system using the new kernel. You might want to wait a while before removing
the old kernel to make sure that no problems arise with the new one.
3. When you are satisfied with the new kernel, remove the old kernel using rpm with the –e
option; you must specify the kernel version number. If necessary, you can manually remove an
old kernel by removing files whose names contain the release number from /boot or / (root).
Remove information about the old kernel from grub.conf. Removing the kernel manually is not
recommended because it is too easy to miss a file and because it does not remove the kernel
from the RPM database.

More Related Content

What's hot

Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protectionsShubham Dubey
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemSadia Bashir
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processTeja Bheemanapally
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and outputMythiliA5
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programmingsudhir singh yadav
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUXSHUBHA CHATURVEDI
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driverVandana Salve
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linuxVarnnit Jain
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System AdministrationSreenatha Reddy K R
 
Root file system
Root file systemRoot file system
Root file systemBindu U
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux BasicsMarc Leeman
 

What's hot (20)

Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protections
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Memory management in linux
Memory management in linuxMemory management in linux
Memory management in linux
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
Linux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platformLinux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platform
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Root file system
Root file systemRoot file system
Root file system
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 

Viewers also liked

Software management in linux
Software management in linuxSoftware management in linux
Software management in linuxnejadmand
 
Logrotate sh
Logrotate shLogrotate sh
Logrotate shBen Pope
 
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan BaljevicComparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan BaljevicCircling Cycle
 
syslog-ng: from log collection to processing and information extraction
syslog-ng: from log collection to processing and information extractionsyslog-ng: from log collection to processing and information extraction
syslog-ng: from log collection to processing and information extractionBalaBit
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Open Source Mini Concert-Session 3-Tizen
Open Source Mini Concert-Session 3-TizenOpen Source Mini Concert-Session 3-Tizen
Open Source Mini Concert-Session 3-TizenYoonsoo Kim
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversAnil Kumar Pugalia
 

Viewers also liked (9)

Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Logrotate sh
Logrotate shLogrotate sh
Logrotate sh
 
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan BaljevicComparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
 
syslog-ng: from log collection to processing and information extraction
syslog-ng: from log collection to processing and information extractionsyslog-ng: from log collection to processing and information extraction
syslog-ng: from log collection to processing and information extraction
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Syslog
SyslogSyslog
Syslog
 
Open Source Mini Concert-Session 3-Tizen
Open Source Mini Concert-Session 3-TizenOpen Source Mini Concert-Session 3-Tizen
Open Source Mini Concert-Session 3-Tizen
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux Drivers
 
RPM Building
RPM BuildingRPM Building
RPM Building
 

Similar to RPM (LINUX)

101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package managementAcácio Oliveira
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Yum package manager
Yum package managerYum package manager
Yum package managerLinuxConcept
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernelRaghu nath
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processHari Shankar
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryAneesa Rahman
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2Trinh Tuan
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processsagarpdalvi
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14kmsa
 

Similar to RPM (LINUX) (20)

101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
6 - Package Management in Red Hat
6 - Package Management in Red Hat6 - Package Management in Red Hat
6 - Package Management in Red Hat
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package management
 
Rpm Introduction
Rpm IntroductionRpm Introduction
Rpm Introduction
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
Linux16 RPM
Linux16 RPMLinux16 RPM
Linux16 RPM
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Yum package manager
Yum package managerYum package manager
Yum package manager
 
Linux16 RPM
Linux16 RPMLinux16 RPM
Linux16 RPM
 
Building a linux kernel
Building a linux kernelBuilding a linux kernel
Building a linux kernel
 
$ make install
$ make install$ make install
$ make install
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & Recovery
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 
Oracle11g on fedora14
Oracle11g on fedora14Oracle11g on fedora14
Oracle11g on fedora14
 

More from Raghu nath

Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)Raghu nath
 
Javascript part1
Javascript part1Javascript part1
Javascript part1Raghu nath
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsRaghu nath
 
Selection sort
Selection sortSelection sort
Selection sortRaghu nath
 
Binary search
Binary search Binary search
Binary search Raghu nath
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)Raghu nath
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithmsRaghu nath
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp roleRaghu nath
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4Raghu nath
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3Raghu nath
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2Raghu nath
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1Raghu nath
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2Raghu nath
 
python chapter 1
python chapter 1python chapter 1
python chapter 1Raghu nath
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell ScriptingRaghu nath
 

More from Raghu nath (20)

Mongo db
Mongo dbMongo db
Mongo db
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
MS WORD 2013
MS WORD 2013MS WORD 2013
MS WORD 2013
 
Msword
MswordMsword
Msword
 
Ms word
Ms wordMs word
Ms word
 
Javascript part1
Javascript part1Javascript part1
Javascript part1
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Selection sort
Selection sortSelection sort
Selection sort
 
Binary search
Binary search Binary search
Binary search
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
 
Stemming algorithms
Stemming algorithmsStemming algorithms
Stemming algorithms
 
Step by step guide to install dhcp role
Step by step guide to install dhcp roleStep by step guide to install dhcp role
Step by step guide to install dhcp role
 
Network essentials chapter 4
Network essentials  chapter 4Network essentials  chapter 4
Network essentials chapter 4
 
Network essentials chapter 3
Network essentials  chapter 3Network essentials  chapter 3
Network essentials chapter 3
 
Network essentials chapter 2
Network essentials  chapter 2Network essentials  chapter 2
Network essentials chapter 2
 
Network essentials - chapter 1
Network essentials - chapter 1Network essentials - chapter 1
Network essentials - chapter 1
 
Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2
 
python chapter 1
python chapter 1python chapter 1
python chapter 1
 
Linux Shell Scripting
Linux Shell ScriptingLinux Shell Scripting
Linux Shell Scripting
 
Perl
PerlPerl
Perl
 

Recently uploaded

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 

Recently uploaded (20)

Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 

RPM (LINUX)

  • 1. RPM: The RPM Package Manager
  • 2. RPM (RPM Package Manager; www.rpm.org) works only with software packages built for processing by RPM; it can download, install, uninstall, upgrade, query, and verify RPM packages. The files that hold these packages have a filename extension of .rpm. RPM uses the local RPM installation database to track the locations where software packages are installed, the versions of the installed packages, and the dependencies between the packages. RPM uses the Berkeley Database (Berkeley DB or BDB) and stores the database files in /var/lib/rpm. RPM forms the basis for yum: yum finds packages, downloads them from repositories, and then calls RPM to install/upgrade/remove the packages.
  • 3. Querying Packages and Files The following rpm command displays a list of one-line summaries of all packages installed on the system: $ rpm -qa mtools-4.0.15-2.fc15.i686 iwl6000-firmware-9.221.4.1-2.fc15.noarch gnome-desktop3-2.91.93-1.fc15.i686 libmusicbrainz3-3.0.3-3.fc15.i686 dejavu-fonts-common-2.32-2.fc15.noarch pptp-1.7.2-12.fc15.i686
  • 4. The –q option queries the package database; the –a option specifies all packages. Without –a, –q takes the name of a package as an argument and displays information about that package only. For instance, rpm –q ypserv tells you whether the ypserv package is installed and, if so, which version is installed. Use the –ql options to list the files in a package.
  • 5. $ rpm -q ypserv package ypserv is not installed $ rpm -ql logrotate /etc/cron.daily/logrotate /etc/logrotate.conf /etc/logrotate.d /usr/sbin/logrotate /usr/share/doc/logrotate-3.7.9 /usr/share/doc/logrotate-3.7.9/CHANGES /usr/share/doc/logrotate-3.7.9/COPYING /usr/share/man/man5/logrotate.conf.5.gz /usr/share/man/man8/logrotate.8.gz /var/lib/logrotate.status With the –qi options, rpm displays information about a package:
  • 6. $ rpm -qi logrotate Name : logrotate Version : 3.7.9 Release : 8.fc15 Architecture: i686 Install Date: Wed 23 Mar 2011 05:37:59 PM PDT Group : System Environment/Base Size : 84226 License : GPL+ Signature : RSA/SHA256, Mon 21 Mar 2011 03:05:16 PM PDT, Key ID b4ebf579069c8460 Source RPM : logrotate-3.7.9-8.fc15.src.rpm
  • 7. Build Date : Mon 21 Mar 2011 06:28:12 AM PDT Build Host : x86-06.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project Summary : Rotates, compresses, removes and mails system log files
  • 8. Description : The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job.
  • 9. Install the logrotate package if you need a utility to deal with the log files on your system. You can use the –qf options to determine which package a file belongs to; it works with installed packages only. Use the yum whatprovides command (page 537) to search repositories for the same information. The following command shows that more is part of the util-linux package: $ rpm -qf /bin/more util-linux-2.19-3.fc15.i686 Include the –p option with other options to query an uninstalled RPM package file:
  • 10. $ ls ypser* ypserv-2.24-2.fc15.i686.rpm $ rpm -qip ypserv-2.24-2.fc15.i686.rpm Name : ypserv Version : 2.24 Release : 2.fc15
  • 11. Installing, Upgrading, and Removing Packages Although it is frequently easier to use yum or gpk-application, you can use rpm to download, install, upgrade, or remove a package. Run rpm with root privileges; although you can run rpm as a nonprivileged user, you will not have permission to write to the necessary directories during an install or uninstall, and the procedure will fail. During a query, you do not need to work with root privileges, so you can and should work as a nonprivileged user. Give the –U (upgrade) option, followed by the name of the file that contains the RPM version of the package you want to install. The –U option upgrades existing packages and installs new packages (as though you had used the –i option). For kernels, use –i (not –U) to leave the old kernel intact when you install a new kernel. Add the –v (verbose) option to display more information about what is happening and the –h (or ––hash) option to display hash marks as the package is unpacked and installed.
  • 12. Installing a package For example, the following command installs the samba package on the local system: # ls samba* samba-3.6.0-64pre1.fc15.1.i686.rpm # rpm -Uvh samba-3.6.0-64pre1.fc15.1.i686.rpm Preparing... ########################################### [100%] 1:samba ########################################### [100%] When you install a package, the rpm file must be in the working directory, or you must use a pathname that points to the rpm file. If you specify an FTP or HTTP URL, rpm will download the package before installing it (but it will not download or install dependencies):
  • 13. # rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/updates/15/i386/bind-9.8.0-5.P2.fc15.i686.rpm Removing a package The following command removes the samba package. You can give the command from any directory: # rpm -e samba error: Failed dependencies: samba is needed by (installed) system-config-samba-1.2.91-2.fc15.noarch When you run this command, rpm reports that another package, system-configsamba, is dependent on the samba package. To remove the samba package, you have two choices: You can ignore the dependency by including the rpm ––nodeps option or you can remove the dependent package and then remove the samba package. # rpm -e system-config-samba # rpm -e samba
  • 14. If you remove the samba package without removing the package that is dependent on it, the utilities within the dependent package will not work. In the preceding example, the system-config-samba utility will not work. When you use rpm to remove a package, rpm queries package database to find the information it needs to uninstall the package and removes links, unloads device drivers, and stops daemons as necessary. Refer to the rpm man page for more rpm options.
  • 15. Installing a Linux Kernel Binary The following steps install a Linux kernel binary from an RPM package. If you simply want to install the latest kernel for the local system, give the command yum install kernel instead. Refer to Chapter 15 when you want to configure and rebuild a kernel from source files, rather than installing a new, prebuilt kernel binary. 1. Run rpm with the –i option to install the new kernel. Do not use the –U option: You are installing a new kernel that has a different name than the old kernel; you are not upgrading the existing kernel.
  • 16. 2. Make sure the new kernel works before you remove the old kernel. To verify the new kernel works, reboot the system using the new kernel. You might want to wait a while before removing the old kernel to make sure that no problems arise with the new one. 3. When you are satisfied with the new kernel, remove the old kernel using rpm with the –e option; you must specify the kernel version number. If necessary, you can manually remove an old kernel by removing files whose names contain the release number from /boot or / (root). Remove information about the old kernel from grub.conf. Removing the kernel manually is not recommended because it is too easy to miss a file and because it does not remove the kernel from the RPM database.