Howto install manage packages rhel8: Difference between revisions

From Vidalinux Wiki
Jump to navigation Jump to search
(Created page with "= subscribe to redhat network = register your server to redhat network subscription-manager register subscription-manager config --rhsm.auto_enable_yum_plugins=0 subscripti...")
 
Line 41: Line 41:
installing local rpm:
installing local rpm:
  yum -ivh application.rpm
  yum -ivh application.rpm
= Yum =  
= Dnf =
update application database:
install package:
  yum check-update
  dnf install httpd-manual -y
install application using yum:
download rpm package without installing:
  yum install [nombre-de-aplicación]
dnf download httpd
perform local rpm installation:
dnf install httpd-2.4.6-45.el7.centos.x86_64.rpm
remove installed package:
  dnf remove httpd -y
check for available updates:
dnf check-update
obtain info about group:
obtain info about group:
  yum group info "Server with GUI"
  dnf group info "Server with GUI"
install group of application:
install group of application:
  yum group install "Server with GUI"
  dnf group install "Server with GUI"
remove application:
yum remove [nombre-de-aplicación]
update all packages on system:
update all packages on system:
  yum update
  dnf update -y
search for an application:
search for an application:
  yum seach [nombre-de-aplicación]
  dnf seach httpd
list packages available to install:
list packages available to install:
  yum list  
  dnf list  
list packages installed:
list packages installed:
  yum list installed
  dnf list installed
use grep to find an specific package:
use grep to find an specific package:
  yum list |grep samba
  dnf list |grep samba
list package dependencies:
list package dependencies:
  yum deplist httpd
  dnf deplist httpd
show package info:
show package info:
  yum info [nombre-de-aplicación]
  dnf info httpd
list packages available:
list packages update available:
  yum list updates
  dnf list updates
clean packages yum cache:  
clean yum cache:  
  yum clean packages
  dnf clean packages
clean all yum cache:
clean all yum cache:
  yum clean all
  dnf clean all
find which package provides specific file:
find which package provides specific file:
  yum whatprovides /usr/lib/libstdc++.so.6
  dnf whatprovides /usr/lib/libstdc++.so.6
you can skip yum command updates on command line itself using following syntax:
you can skip yum command updates on command line itself using following syntax:
  yum --exclude=package* update
  dnf --exclude=package* update
  yum --exclude=php* update
  dnf --exclude=php* update
  yum --exclude=kernel* update
  dnf --exclude=kernel* update

Revision as of 15:41, 22 November 2021

subscribe to redhat network

register your server to redhat network

subscription-manager register
subscription-manager config --rhsm.auto_enable_yum_plugins=0
subscription-manager attach --auto

display repos:

subscription-manager repos

rpm

perform an rpm query to list all packages installed:

rpm -qa

list what version of the package is currently installed:

rpm -q yum

find out what package provides filename:

rpm -qf /etc/yum.repos.d

get detailed information about the package:

rpm -qi  yum

list the files installed by the package:

rpm -ql yum

list just the configuration files installed by the package:

rpm -qc openssh-clients

list just the configuration files installed by the package:

rpm -qd openssh-clients

list shell scripts that run before or after the package is installed or removed:

rpm -q --scripts

list change information for the package:

rpm -q --changelog audit

list documentation on rpm archive:

rpm -q -p application.rpm -d

list configuration files on rpm archive:

rpm -q -p application.rpm -c

list archives on rpm archive:

rpm -q -p application.rpm -l

list rpm archive scripts:

rpm -q -p application.rpm --scripts

list rpm archive changelog:

rpm -q -p application.rpm --changelog

list total space consume by rpm archive after install:

rpm -q -p application.rpm -i

installing rpm from internet:

rpm -ivh https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/e/epel-release-8-8.el8.noarch.rpm

installing local rpm:

yum -ivh application.rpm

Dnf

install package:

dnf install httpd-manual -y

download rpm package without installing:

dnf download httpd

perform local rpm installation:

dnf install httpd-2.4.6-45.el7.centos.x86_64.rpm

remove installed package:

dnf remove httpd -y

check for available updates:

dnf check-update

obtain info about group:

dnf group info "Server with GUI"

install group of application:

dnf group install "Server with GUI"

update all packages on system:

dnf update -y

search for an application:

dnf seach httpd

list packages available to install:

dnf list 

list packages installed:

dnf list installed

use grep to find an specific package:

dnf list |grep samba

list package dependencies:

dnf deplist httpd

show package info:

dnf info httpd

list packages update available:

dnf list updates

clean yum cache:

dnf clean packages

clean all yum cache:

dnf clean all

find which package provides specific file:

dnf whatprovides /usr/lib/libstdc++.so.6

you can skip yum command updates on command line itself using following syntax:

dnf --exclude=package* update
dnf --exclude=php* update
dnf --exclude=kernel* update