Presentation is loading. Please wait.

Presentation is loading. Please wait.

RedHat Package Management

Similar presentations


Presentation on theme: "RedHat Package Management"— Presentation transcript:

1 RedHat Package Management
RPM and YUM in RedHat Enterprise, Fedora, Suse and Centos

2 RPM rpm command installs "packages" from *.rpm files at any source location. Basic commands: rpm –i somefile.rpm (install) rpm –e somefile (remove) rpm –U somefile (upgrade, remove old) rpm –F somefile (update, keep old) rpm -qa | grep "somefile" (query installed packages) rpm -qa --last (query installed packages in installed sequence) rpm -qf /path/to/filet (Find out what package a file belongs) rpm -qc --last (Find out what package a config file belongs) rpm -qcf /path/to/file (Display list of configuration files for a command) rpmbuild is used to build rpms from source directories, used for kernel compilation. RPMs are digitally signed with a GPG key by the vendor to ensure trustworthiness.

3 Examples rpm –ivh (install), rpm –uvh (upgrade) rpm –e (erase)
rpm –qa | grep <package name> rpm –q, rpm –qi <package name> rpm –qf (associated package files) rpm –qdf (associated package) documentation) rpm –qlp (all files in a package) rpm –qRp (list packag dependencies rpm –Vp <package name>, rpm –Va (verify package) rpm –Vf <filename> (verify file ownership)

4 YUM yum is a frontend to the rpm command. It has the advantage of seeking the most recent updates on the Internet (if desired) and resolving most dependencies automatically. yum is setup to work off of Internet "repositories" on the Internet. Files containing these locations are listed in /etc/yum.repos.d/*.repo You can add your own *.repo file directories in the same format and import gpg keys using the rpm –import command to insure integrity of the site. Internet is usually required for how to configure the latest repositories. Remember just as in Windows, make sure you can trust the .rpm source site.

5 YUM Basic commands: yum search somefile (look for the package)
yum info somefile (get info on the package) yum list somefile (get installed and available versions) yum list installed (same as rpm -qa) yum list available (what's available in repository) yum grouplist "some search string" (look for like packages to search string) yum install somefile (install the package and any dependencies) yum localinstall /path/to/somefile (yum install off local media) yum remove somefile (uninstall the package) yum upgrade somefile (upgrade the package removing prior versions) yum update somefile (update the package keeping prior version) yum provides somefile (what packages are associated with a file) yum repolist all (list defined repositories) yum clean all (clean yum download directories)

6 GUI Check System/Administration/Software Sources, Software Update

7 Yum and rpm files See /etc/rpm directory See /etc/yum directory
See /etc/yum.conf See /var/cache/yum

8 Examples yum install <packagename>
yum remove <packagename> yum update <packagename> yum search <packagename> yum info <packagename> yum list <packagename>. yum list installed yum provides <filename> (list package owner) yum –enablerepo=<old repo> yum shell (interactive shell)

9 dnf DNF or Dandified yum is the next generation version of yum.
It roughly maintains CLI compatibility with yum (i,.e. same options for package management) and defines a strict API for extensions and plugins. Plugins can modify or extend features of DNF or provide additional CLI commands. DNF is a software package manager that installs, updates, and removes packages on RPM-based Linux distributions. It has been the default package manager since Fedora 22. Mainly because of changes in Python support (V3)

10 dnf commands (see yum2dnf)
autoremove check-update clean distro-sync downgrade group help history info install list makecache mark provides reinstall remove repolist repository-packages search updateinfo upgrade upgrade-to


Download ppt "RedHat Package Management"

Similar presentations


Ads by Google