linux_wiki:install_and_update_software_packages_from_red_hat_network_a_remote_repository_or_from_the_local_file_system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:install_and_update_software_packages_from_red_hat_network_a_remote_repository_or_from_the_local_file_system [2016/02/29 21:52]
billdozor created
linux_wiki:install_and_update_software_packages_from_red_hat_network_a_remote_repository_or_from_the_local_file_system [2019/05/25 23:50] (current)
Line 3: Line 3:
 **General Information** **General Information**
  
-About this page/how-to/script.+Managing software packages and repos.
  
 ---- ----
  
-=== Yum and Packages ===+===== Yum and Packages =====
  
 Check to see if updates are available Check to see if updates are available
Line 14: Line 14:
 </code> </code>
  
 +\\
 Update all packages, assume yes to all questions Update all packages, assume yes to all questions
 <code bash> <code bash>
Line 19: Line 20:
 </code> </code>
  
 +\\
 Search package name and summary for "apache" Search package name and summary for "apache"
 <code bash> <code bash>
Line 24: Line 26:
 </code> </code>
  
 +\\
 View package details View package details
 <code bash> <code bash>
Line 29: Line 32:
 </code> </code>
  
 +\\
 Install Apache Web Server Install Apache Web Server
 <code bash> <code bash>
Line 34: Line 38:
 </code> </code>
  
 +\\
 List all installed package List all installed package
 <code bash> <code bash>
Line 39: Line 44:
 </code> </code>
  
 +\\
 What package created a file (or directory) What package created a file (or directory)
 <code bash> <code bash>
Line 44: Line 50:
 </code> </code>
  
 +\\
 Uninstall package Uninstall package
 <code bash> <code bash>
Line 49: Line 56:
 </code> </code>
  
 +\\
 Clean yum cache files Clean yum cache files
 <code bash> <code bash>
Line 54: Line 62:
 </code> </code>
  
 +\\
 List repositories List repositories
 <code bash> <code bash>
Line 59: Line 68:
 </code> </code>
  
-=== Yum Groups ===+---- 
 + 
 +==== Yum Groups ====
  
 List available groups List available groups
Line 66: Line 77:
 </code> </code>
  
 +\\
 List available groups, including hidden List available groups, including hidden
 <code bash> <code bash>
Line 72: Line 84:
   * This includes most of the Virtualization Groups   * This includes most of the Virtualization Groups
  
 +\\
 List all packages that belong to the "Security Tools" group List all packages that belong to the "Security Tools" group
 <code bash> <code bash>
Line 77: Line 90:
 </code> </code>
 **Yum group info markers meanings** **Yum group info markers meanings**
-  * "-" = Package isn't installed, and won't be installed as part of the group (Eg.  "yum group install foo -pkgA" or "yum group install foo; yum remove pkgA" … this will have pkgA marked as '-')+  * "-" = Package isn't installed, and won't be installed as part of the group 
 +    * (Eg.  "yum group install foo -pkgA" or "yum group install foo; yum remove pkgA" … this will have pkgA marked as '-')
   * "+" = Package isn't installed, but will be the next time you run "yum upgrade" or "yum group upgrade foo"   * "+" = Package isn't installed, but will be the next time you run "yum upgrade" or "yum group upgrade foo"
   * " " = Package is installed, but wasn't installed via the group (so "group remove foo"  won't remove it).   * " " = Package is installed, but wasn't installed via the group (so "group remove foo"  won't remove it).
   * "=" = Package is installed, and was installed via the group.   * "=" = Package is installed, and was installed via the group.
  
 +\\
 Install the Security Tools group Install the Security Tools group
 <code bash> <code bash>
Line 87: Line 102:
 </code> </code>
  
 +\\
 To undo a group install: To undo a group install:
  
Line 99: Line 115:
 </code> </code>
  
 +\\
 2) [Optional] View detailed information about ID 25 (Security Tools group install) 2) [Optional] View detailed information about ID 25 (Security Tools group install)
 <code bash> <code bash>
Line 122: Line 139:
 </code> </code>
  
 +\\
 3) Undo the group install (removes installed packages) 3) Undo the group install (removes installed packages)
 <code bash> <code bash>
Line 129: Line 147:
 ---- ----
  
-==== RPM (Redhat Package Manager) ====+===== RPM (Redhat Package Manager) =====
  
 Use yum downloader to download RPM Use yum downloader to download RPM
Line 136: Line 154:
 </code> </code>
  
 +\\
 Install package Install package
 <code bash> <code bash>
Line 144: Line 163:
   * h - hash progress bar   * h - hash progress bar
  
 +\\
 List all installed rpm packages List all installed rpm packages
 <code bash> <code bash>
Line 151: Line 171:
   * a - all   * a - all
  
 +\\
 List all files installed as part of package List all files installed as part of package
 <code bash> <code bash>
Line 157: Line 178:
   * l - list files   * l - list files
  
 +\\
 List all files that are part of a local RPM file that is not installed yet List all files that are part of a local RPM file that is not installed yet
 <code bash> <code bash>
Line 162: Line 184:
 </code> </code>
  
 +\\
 List documentation files for a package List documentation files for a package
 <code bash> <code bash>
Line 168: Line 191:
   * d - documentation files   * d - documentation files
  
 +\\
 List configuration files for a package List configuration files for a package
 <code bash> <code bash>
Line 174: Line 198:
   * c - configuration files   * c - configuration files
  
 +\\
 Remove package Remove package
 <code bash> <code bash>
Line 180: Line 205:
   * -e => erase   * -e => erase
  
 +\\
 Install local rpm, auto install dependencies Install local rpm, auto install dependencies
 <code bash> <code bash>
Line 185: Line 211:
 </code> </code>
   * Note: yum localinstall => maintained for legacy reasons only, as yum install will behave as a local install if the target is a file.   * Note: yum localinstall => maintained for legacy reasons only, as yum install will behave as a local install if the target is a file.
 +
 +----
 +
 +===== Managing Repositories =====
 +
 +Repo config files location
 +  * /etc/yum.repos.d
 +  * file must end in ".repo"
 +
 +\\
 +Show all enabled repos
 +<code bash>
 +yum repolist
 +</code>
 +
 +\\
 +Show all enabled and disabled repos
 +<code bash>
 +yum repolist all
 +</code>
 +
 +----
 +
 +==== Yum Config Manager ====
 +Add new repo
 +<code bash>
 +yum-config-manager --add-repo=http://dl.fedoraproject.org/pub/epel/7/x86_64
 +</code>
 +
 +\\
 +Disable repo using yum-config-manager and repo id (get id from "yum repolist")
 +<code bash>
 +yum-config-manager --disable dl.fedoraproject.org_pub_epel_7_x86_64_
 +</code>
 +
 +\\
 +Remove repo
 +<code bash>
 +rm -f /etc/yum.repos.d/dl.fedoraproject.org_pub_epel_7_x86_64_.repo
 +</code>
 +
 +----
 +
 +==== Repos via Config Files ====
 +
 +Add new repo; create new file in /etc/yum.repos.d/
 +<code bash>
 +vim /etc/yum.repos.d/fedora_epel.repo
 +
 +[EPEL7]
 +name=Fedora EPEL 7
 +baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64/
 +enabled=1
 +</code>
 +  * [EPEL7] => repo id
 +  * Fedora EPEL 7 => repo name
 +
 +\\
 +Disable repo by editing repo file
 +<code bash>
 +vim /etc/yum.repos.d/fedora_epel.repo
 +
 +enabled=0
 +</code>
 +
 +----
 +
 +==== Configuring A Local Repository ====
 +
 +Setup directory and mount iso
 +<code bash>
 +mkdir -p /repos/local
 +mount -o loop rhel-server-7.1-x86_64-dvd.iso /repos/local
 +</code>
 +
 +\\
 +Create local repo config file
 +<code bash>
 +cd /etc/yum.repos.d/
 +vim local-repo.repo
 +
 +[local-repo]
 +name=Red Hat Linux Local Repo
 +baseurl=file:///repos/local
 +enabled=1
 +gpgcheck=0
 +</code>
 +
 +----
 +
 +===== Configure The GPG Key =====
 +
 +Download gpg key from repo
 +<code bash>
 +cd /etc/pki/rpm-gpg
 +wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
 +</code>
 +
 +\\
 +Add gpg check and key to repo config
 +<code bash>
 +cd /etc/yum.repos.d
 +vim dl.fedoraproject.org_pub_epel_7_x86_64_.repo
 +
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
 +</code>
  
 ---- ----
  
  • linux_wiki/install_and_update_software_packages_from_red_hat_network_a_remote_repository_or_from_the_local_file_system.1456800776.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)