Red Hat Package Management

 


Red Hat Subscription Management:
--------------------------------
  1. Red Hat Subscription provides tool that can be used to entitle machine to product subscription.
  2. Subscription allowing administrators to get updates to software packages and track information about the support contract and subscription used by the system.
  3. Standard tools such as Package Kit and yum can be obtain software packages and updates through a content distribution network    provided by Red Hat. 
Register:- This allow subscription manager to uniquely inventory the system.
Subscribe:- Subscription have specific levels of support, expiration dates and defaults repositories.
Enable Repositories:- Enable multiple repositories by default with each subscription.
Review and Track:- Subscription information can be viewed locally on a specific system or for an account, in either Red Hat Customer Portal Subscription page or Subscription Asset Manager (SAM)

System Registration:
--------------------
  1. There are a number of different ways to register a system with Red Hat Customer Portal.
  2. There is a graphical interface that you can access with GNOME application or through the web console service and also there is command line.
  3. Once Registration successfully done, your system is ready to take the updates or install new software from Red Hat.
Note: "GNU Network Object Environment Model is a free & open source desktop environment for Linux & other Unix operating system. It's started from 15 August 1997."

Graphical Mode
  1. Activities Show All Redhat Subscription Manger
  2. Activities Type in Search Subscription

Terminal Mode

1) Register a system to Red Hat Account
#subscription-manager register -username=name -password=password

2) View Available Subscription
#subscription-manager list -available | less

3) Auto Attached a Subscription
#subscription-manager attached -auto

4) Alternatively Attached a Subscription From Specific Pool
#subscription-manager attached -pool=poolId

5) View Consumed Subscriptions
#subscription-manager list -consumed

6) Unregister a System
#subscription-manager unregister

Entitlement Certificates:
-------------------------
An entitlement is a subscription that has been attached to a system. Digital certificates are used to store current information about entitlements on the local system.

Note: "Once registerd, entitlement certificates are stored in /etc/pki and its subdirectories."

  1. /etc/pki/product: Contains certificate indicating which Red Hat products are installed on the System.
  2. /etc/pki/consumer: Contain certificate identifying the Red Hat account to which the system is registerd.
  3. /etc/pki/entitlement: Contain certificate indicating which subscription are attached to the system.
Red Hat Package Manager:
------------------------
  1. RPM (Red Hat Package Manager) is originally developed by Red Hat and most popular package management utility in Linux Platform.
  2. RPM is distributed under the terms of the GPL (General Public License).
  3. RPM provides a standard way to package software for distribution
  4. It allows administrator to track where files installed by the software package and which one need to be removed.
  5. Package management system take all the various files containing programs and data, documentation and configuration information and place them in one specially formatted file a package file with an extension of ".rpm".
  6. RPM maintains a database of installed packages, which enables powerful and fast queries. The RPM database is inside /var/lib, and the file is named __db*.

Package Identification:
-----------------------
vsftpd-3.0.3-28.el8.x86_64.rpm

vsftpd     Name
-3.0.3     Version
-28.el8    Release
.x86_64    Architecture
.rpm       Extension

RPM Package made up of three component:
---------------------------------------
A) The file installed by the package
B) Information about package (metadata)
  1. Name
  2. Version
  3. Release
  4. Arch
C) Scripts that may run when package is
  1. Installed
  2. Updated
  3. Removed
RPM(Redhat Package Manager) Mode:
---------------------------------
  1. Install: It is used for install any rpm package
  2. Upgrade: It is used to update any existing rpm packages
  3. Remove:  To uninstall any installed rpm package from system
  4. Verify:  Verify the rpm packages
  5. Query:   It is used to find rpm package is installed or not

Note:- "A repository (or repo) is a type of centrally located storage where you can keep all your project's files and resources".


Updates and Patches:
--------------------
  1. When the upstream source code for a software package is patched by Red Hat, a complete RPM package is generated.
  2. If a package is newly added to a system only the latest version of that package is needed, not every version of the package since the first release.
  3. When you update the old version of the package is removed and the new version is installed.
#rpm [option] package_name

-qaList all installed packages
-qlDisplay information about a package
-qiList all files included in a package
-qcList configuration files included in a package
-qdList documentation files included in a package
-q --changelogShow a short summary of the reason for a new package release
-q --scriptDisplay the shell scripts included in a package
-iInstalling a rpm package
-vVerbose
-h or -- percentDisplay progression bar in hash or percentage
-UFor upgrading the existing installed package
-eTo remove or erase any installed package


YUM Package Manager:
--------------------
  1. YUM(Yellow dog Updater Modified) is created by Terra Soft, ported to many Linux distributions.
  2. YUM is used to managed packages like installing,updating,removing and querying.
  3. The YUM command searches packages and their dependencies so they may be installed together and resolve dependency issues.
  4. The main configuration file for yum is /etc/yum.conf with additional repository configuration files located in the /etc/yum.repos.d directory.

How we can configure YUM server in RHEL 8



Install,Uninstall & Upgrade Packages
CommandExampleFunctionality
installyum install httpdInstall a package from yum repository
removeyum remove httpdremove install package and its dependecies from system
eraseyum erase httpdSimilar to remove command
updateyum update or yum update httpdUpdate one or more package on the system
update-toyum update-to httpd-2.7-1.1Update one or more package to a specific version
upgradeyum upgradeUpdate all package to the latest version
reinstallyum reinstall httpdReinstall the current version of a specific package
autoremoveyum autoremove httpdRemove a package and all other unnecessary packages
downgradeyum downgrade httpdDowngrade a specific package to an earlier version
swapyum swap httpd ntfs-3gRemove package and install another
localinstallyum localinstall http://127.0.0.1/baseos/httpd-1.b.c.rpmInstall a package from local repository
groupinstallyum groupinstall "group name"Install package from a specific group


Base Package Commands
CommandExampleFunctionality
listyum list allList package names from repositories
infoyum info httpdShow information about a specific package
searchyum search apacheSearch for a package name and description
updateinfoyum updateinfo baseosShow information about available package updates
check-updateyum check-updateShow available package from enabled repositories
grouplistyum grouplistShow names and available package groups
deplistyum deplist vsftpdShow dependencies for a specific package
providesyum provides "*/bin/zsh"Locate the package that provided a specific file
groupinfoyum groupinfo "group name"Show description and contents of a package group
helpyum help or yum help listDisplay yum help information or help on sub command

Manging YUM Repos
CommandExampleFunctionality
repolistyum repolistList the available software repositories
repo-pkgsyum repo-pkgs baseos listUse packages in a specific repository
repoinfoyum repoinfo baseosShow information about enabled repositories
makecacheyum makecacheDownload repository data to cache

Troubleshooting YUM
CommandExampleFunctionality
cleanyum clean packages or yum clean allClean out all cached package data and metadata
checkyum checkCheck local RPM db for problems
historyyum history list or yum history undo or yum history redoView and use yum transactions
fssnapshotyum fs filtersShow LVM snapshots

Group installing and Removing:
------------------------------
Yum also has a concept of groups, which are collection of related software together for a particular purpose.

In RHEL 8 have two types of group
  1. Regular Group: This group are collection of packages
  2. Environment Group: This group are collection of regular groups
YUM Group Command
CommandExampleFunctionality
group listyum group list or yum grouplistCommand will show the names of installed and available groups.
group list hiddenyum group list hiddenCommand will show you hidden groups
groupinfoyum group info or yum groupinfoCommand will show information about a group
group install group_nameyum group install "Group Name"Command will install Group
group summaryyum group summaryTo view number of installed groups,available group



Thanks & Regards
Abhishek Pathak
+91-9621134014
abhishek9621134014@outlook.com

No comments:

Post a Comment

Computer Hardware_(A+) & Operating System with Networking

Microprocessor Motherboard About Operating System Create Bootable Pen Drive via Command Map Network Drive File Transfer Protocol in Windows ...