Objectives
Upon completion of this unit, you should be able to:
- Install and remove RPM packages
- Query packages and verify their state
- Manage packages using yum
- Understand the relationship between yum and rpm
- Configure yum to connect to a RHN statellite server
- Create a private yum repository
- Configure yum to connect to a private repository
- Configure and use Red Hat Network
RPM Package Manager
RPM Components
- local database
- rpm and related executables
- RPM frontends such as yum
- package files
Primary Functions
- install/ remove
- query
- verify
Installing and Removing Software
Primary RPM options:
- Install: rpm �Ci, �Cinstall
- Upgrade: rpm �CU, �Cupgrade
- Freshen: rpm �CF, �Cfreshen
- Erase: rpm �Ce, �Cerase
Output options: �Cv, �Ch
URL support: ftp://(with globbing), http://
Many other install-options are available to address special cases
Updatting a Kernel RPM
Make sure to install kernel updates
Do not use rpm �CU or rpm �CF !
- rpm �Civh kernel-version.arch.rpm
- Boot new kernel to test
- Revert to old kernel if a problem arises
- rpm �Ce kernel-oldversion if no problems
rpm Queries
Syntax:
- rpm �Cq what_package what_information
Installed package options:
- rpm �Cqa lists installed packages
- rpm �Cqf filename #show owning package
- rpm �Cqi package_name #general information
- rpm �Cql package_name #list files in package
Unintalled package options:
- rpm �Cqip package_file.i386.rpm
- rpm �Cqlp package_file.i686.rpm
rpm Verification
Install RPM file verification:
- rpm �CV <package_name>
- rpm �CVp <package_file>.i386.rpm
- rpm �CVa
Signature verification BEFORE package install:
- rpm �Cimport RPM-GPG-KEY
- rpm �CK <package_file>.i386.rpm
About yum
Front-end to rpm
- Designed to resolve package dependencies
- Can locate packages across multiple repositories
Repalcement of up2date
Using yum
Install/ Remove/ Update
- yum install package…
- yum remove package…
- yum update [package…]
Searching packages/ files
Searching packages
- yum search searchterm
- yum list (all | available | extras | installed | recent | updates)
- yum info packagename
Searching files
- yum whatprovides filename
Configuring Additional Repositories
Create a file in /etc/yum.repos.d for your repository
Required information
- [repo-name]
- name=A nice decription
- baserul=http://yourserver.com/path/to/repo
- enabled=1
- gpgcheck=1
Creating a private repository
Create a directory to hold your packages
Make this directory available by http/ftp
Install the createrepo RPM
Run createrepo �Cv /package/directory
This will create a repodata subdirectory and the needed support files
Red Hat Network
Centralized platform for systems management
- provides Red Hat software packages
- shows if errata are available for systems
- can update many systems at once
- allows ful life cycle managment
Webbased management interface
Uses HTTPS for all transactions
Red Hat Network Server
rhn.redhat.com or local Satellite/ Proxy
- Web based management of machines
- RHN proxy caches RHN traffic
- RHN satellite provides an autonomous RHN
RHN Accounts
- RHN users for registration of machines and web based management
- System ID for automatic authentication of systems
Entitlements
Grant access to software channels
- Base channel
- Child channel(s)
Define level of service
- Update
- Management
- Provisioning
- Monitoring
Red Hat Network Client
Registration
- Run rhn_register
- Select the update location (RHN or local satellite/proxy)
- Enter account information
Interactive usage
- yum plugin for downloading packages from RHN
- Configuration in /etc/yum/pluginconf.d/rhn-plugin.conf
Remote managment
- rhnsd polls RHN every four hours
- rhn_check polls immediately
End of Unit2
Questions and Answers
Summary
- What are the primary functions of RPM?
- What rpm options should be used to install a kernel RPM?
- Package-management with yum
- Relationship between yum and rpm
- Using yum with RHN
- Creating a private repository
- Configuring repositories
- How does Reh Hat Network work?