Overview
Software as Packages
Syntax:
- package: The name of the package
- version: The upstream developer version
- release: The package changes (bugfixes/backports)
- arch: The processor architecture of binaries
Contains:
- Summary, Description, Changelog
- Files Archive: Binaries, Libraries, Default Configuration, Documentation
- Instructions: Dependencies, Pre/Post Install/Uninstall
- Signature
rpm command
Primary RPM Options
-
-i | --install
Install A New RPM Packages -
-F | --freshen
Upgrade The Currently Installed Packages To A Newer Version Skipped If Older Version Is Not Available. -
-U | --upgrade
Upgrade The Currently Installed Packages To A Newer Version Simply Install The Package If Older Version Is Not Available -
-e | --erase
Erase Or Remove The Packages -
-q | --query
Query The RPM Packages -
-V | --verify
Verify The RPM Packages File Type, Permissions, Owner, Group, File Size, MD5 Checksum, Modify Time Against The RPM Database
General Options
-v
Print The Verbose Information-h | --hash
Print The Hash Mark Progress Bar Used With-v
Options
Install Options
--aid
Also Install Dependencies--nodeps
Don’t do a dependency check before installing or upgrading a package--oldpackage
Allow an upgrade to replace a newer package with an older one--replacepkgs
Install the packages even if some of them are already installed on the system--replacefiles
Install the packages even if they replace files from other, already installed, packages
Query Options
-a | --all
Query All Installed Packages-i | --info
Display The Package Information - Name Version & Description-l | --list
List Files Inside The RPM Packages-f | --file
Query To Findout Which Package Owning The Specified File-
-p | --package
Query An Pre-Installed Packages--last
List The Installed Packages (Latest First)--changelog
Display Changelog Information--scripts
List The Scripts That Are Used For Installation & Uninstallation Process
-c | --configfiles
List The Configuration Files-d | --docfiles
List The Documentation Files-R | --requires
List The Capabilities On Which This Package Depends
Examples:
Trusted Installation
- Red Hat Signs All The Package Files With GPG Private Signature.
- The Red Hat Public Key Is Provided With Every Red Hat Distribution.
- To Verify The Integrity Of Any Package File, You Must 1st Import The Red Hat Public Key.
- The RPM Utility Will Automatically Verify The Signature Of Any Package You Install At The Install Time.
Examples:
About Yum
- YUM: Yellowdog Update Modified
- Command-Line Frontend To The RPM
- Designed To Resolve Package Dependencies
- Locate Packages Across The Multiple Repositories Such As RHN, Satellite Or Proxy Servers & Private FTP/Http Repository Servers
Managing Packages With Yum
Primary Yum Options
-
install
Install A Latest Version Of The Package While Ensuring That All Dependencies Are Satisfied -
update
If Run Without Any Packages, Update Every Currently Installed Packages. If One Or More Packages Or Package Globs Are Specified, Yum Will Only Update The Listed Packages. While Updating Packages, Yum Will Ensure That All Dependencies Are Satisfied. -
remove
Remove The Specified Packages From The System As Well As Removing Any Packages Which Are Depend On The Specified Packages -
groupinstall
Install All Of The Individual Packages In The Group -
localinstall
Install A Set Of Local RPM Files If Required The Enabled Repositories Will Be Used To Resolve Dependencies info
Display The Package Information - Name Version & Description-
list
List The Installed & Available Packages groupinfo
Display The Group Information --
grouplist
List The Installed & Available Groups provides
Findout Which Package Owning The Specified Fileserach
Search Any Packages By Matching A String In The Package Name, Description And Summary Fields
Examples:
Enabling Private Yum Repositories
- Default Settings:
/etc/yum.conf
- Personal Settings:
/etc/yum.repos.d/[name].repo
- Template Settings:
/etc/yum.repos.d/rhel-debuginfo.repo
Syntax:
NOTE!: [repositoryid]
Must be a unique name for each repository, one word. Look at yum.conf(5)
and the [repositories]
options for more details.
Example:
Private Yum Repositories
- Create A Directory That Can Hold Your Packages.
- Make That Directory Available Via FTP or HTTP.
- Install The createrepo RPM.
- Run following command
primary.xml.gz
List Of All The RPM In The Repository As Well As Dependency Information & List Of Files Inside The RPM Packages This is used by rpm -qlp
filelists.xml.gz
List Of All The Files In All The RPMs This is used by yum provide
other.xml.gz
Additional Information, Including The Chanage Logs For The RPMs
repomd.xml
Contains The Timestamps & Checksum Values For The Above 3 Files The System Refresh The Cache If repomd.xml File Indicates The Repository Has Been Changed.
comps*.xml
This Optional File Contains The Information About Group Packages. Used For Group Installations & Dependency Resolution
NOTE!: Repository Information Is Cached yum clean dbclean | all
Install A New Kernel
- Installing a new kernel is requires a little more thought and caution.
-
Installing a new kernel is one of the few things that requires a reboot of the system.
-
Kernels Are Installed In Parallel, Not Upgraded:
- Do Not Use
rpm -F
&rpm -U
- Rather Than Use
rpm -i
- Do Not Use
- Yum Properly Handles The Kernel,
- Yum Perform An Install Rather Than Update When Working With A Kernel, Whether You Use
yum update
oryum install
NOTE!: The rpm -F
& rpm -U
Options Removes The Older Version Of The Packages
So If Your Newly Installed Kernel Are Unstable Then You Could Be Left With Unbootable System.
When You Run An Install Instead Of An Upgrade, The Older Version Of The Kernel Is Still Available, And Can Be Selected From The Bootloader.
All Of The Kernel Files Are Version Specific, So It Is Possible To Install Multiple Kernels In A Single System.
By Default, The New Kernel Is Automatically Added To The GRUB Bootloader & Make It Default. You Can Change This Behaviour By Editing /etc/sysconfig/kernel
File.
If You Accidentally Remove The Kernel, Then Use rpm -i --oldpackage
To Get The Older Kernel Package.
About The Red Hat Network
- The Red Hat Network Allows The Administrators
- To Manage Software Installation & Upgrades Efficiently
-
Using A Combination Of Your RHN Acoount & The Yum Utility.
- The Red Hat Network Service Is Provided By
- The rhn.redhat.com
- The Local Satellite Or Proxy Server
- Features Of Red Hat Network:
- Web Based Management Interface
- Uses HTTPS for All The Transactions
- Centralized Platform For System Management
Red Hat Network Client
Registration
- The RHN Registration Is Usually Done At The Installation Time - FirstBoot
- The rhn_register Will Interactively Create Configuartion Files For The Yum Utility As Well As Register Your System At RHN Or Satellite Or Proxy Servers.
- The RHN Registration Can Be Automated With The Help Of rhnreg_ks command.
Interactive Usage:
- Yum Uses Plug-in For RHN Communication
- Already Configured In ``/etc/yum/pluginconf.d/rhnplugin.conf`
Remote Management:
- Actions Queued On RHN Server
- The rhn_check Polls RHN Server Immediately
- The rhnsd Polls RHN Server Every 4 Hours (``/etc/sysconfig/rhn/rhnsd`)
PackageKit
------------------------------------------------------------------------------------------------------------------------- | Function How To Open Shell Command | ------------------------------------------------------------------------------------------------------------------------- | Install/Remove System -> Administration -> Add/Remove Software gpk-application | | View Package Information | |-----------------------------------------------------------------------------------------------------------------------| | Perform Package Update System -> Administration -> Software Update gpk-update-viewer | |-----------------------------------------------------------------------------------------------------------------------| | Enable/Disable System -> Administration -> Add/Remove Software gpk-repo | | Yum Repository System -> Software Sources | |-----------------------------------------------------------------------------------------------------------------------| | View The Transaction System -> Administration -> Add/Remove Software gpk-log | | Information System -> Software Log | |-----------------------------------------------------------------------------------------------------------------------| | Alert When Update System -> Preferences -> Startup Applications gpk-update-icon | | Available Startup Program -> PackageKit Update Applet | |-----------------------------------------------------------------------------------------------------------------------| | Set The Packagekit gpk-prefs | | Preferences | -------------------------------------------------------------------------------------------------------------------------