1 / 8

RedHat Package Management

RedHat Package Management. RPM and YUM in RedHat Enterprise, Fedora, Suse and Centos. 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)

ady
Download Presentation

RedHat Package Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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)

More Related