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

linux_wiki:install_and_update_software_packages_from_red_hat_network_a_remote_repository_or_from_the_local_file_system [2016/03/03 23:09]
billdozor [repos via config files]
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]
Line 1: Line 1:
-====== Install And Update Software Packages From Red Hat Network A Remote Repository Or From The Local File System ====== 
- 
-**General Information** 
- 
-Managing software packages and repos. 
- 
----- 
- 
-===== Yum and Packages ===== 
- 
-Check to see if updates are available 
-<code bash> 
-yum check-update 
-</code> 
- 
-\\ 
-Update all packages, assume yes to all questions 
-<code bash> 
-yum -y update 
-</code> 
- 
-\\ 
-Search package name and summary for "apache" 
-<code bash> 
-yum search apache 
-</code> 
- 
-\\ 
-View package details 
-<code bash> 
-yum info httpd 
-</code> 
- 
-\\ 
-Install Apache Web Server 
-<code bash> 
-yum install httpd 
-</code> 
- 
-\\ 
-List all installed package 
-<code bash> 
-yum list installed 
-</code> 
- 
-\\ 
-What package created a file (or directory) 
-<code bash> 
-yum provides /var/www 
-</code> 
- 
-\\ 
-Uninstall package 
-<code bash> 
-yum remove httpd 
-</code> 
- 
-\\ 
-Clean yum cache files 
-<code bash> 
-yum clean all 
-</code> 
- 
-\\ 
-List repositories 
-<code bash> 
-yum repolist 
-</code> 
- 
----- 
- 
-==== Yum Groups ==== 
- 
-List available groups 
-<code bash> 
-yum group list 
-</code> 
- 
-\\ 
-List available groups, including hidden 
-<code bash> 
-yum group list hidden 
-</code> 
-  * This includes most of the Virtualization Groups 
- 
-\\ 
-List all packages that belong to the "Security Tools" group 
-<code bash> 
-yum group info "Security Tools" 
-</code> 
-**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, 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, and was installed via the group. 
- 
-\\ 
-Install the Security Tools group 
-<code bash> 
-yum group install "Security Tools" 
-</code> 
- 
-\\ 
-To undo a group install: 
- 
-1) View yum history 
-<code bash> 
-yum history 
-Loaded plugins: amazon-id, rhui-lb 
-ID     | Command line             | Date and time    | Action(s)      | Altered 
-------------------------------------------------------------------------------- 
-    25 | group install Security T | 2015-06-06 22:21 | Install        |    3    
-    24 | -y install httpd         | 2015-06-06 21:32 | Install        |    1  
-</code> 
- 
-\\ 
-2) [Optional] View detailed information about ID 25 (Security Tools group install) 
-<code bash> 
-yum history info 25 
-Loaded plugins: amazon-id, rhui-lb 
-Transaction ID : 25 
-Begin time     : Sat Jun  6 22:21:20 2015 
-Begin rpmdb    : 696:2cf91b5d397c109762f978831d2194caabcf22c4 
-End time       :            22:21:21 2015 (1 seconds) 
-End rpmdb      : 699:ac6d05d5b20db2192d6b5f7f30723488222723d0 
-User           :  <user> 
-Return-Code    : Success 
-Command Line   : group install Security Tools 
-Transaction performed with: 
-    Installed     rpm-4.11.1-25.el7.x86_64                @rhui-REGION-rhel-server-releases 
-    Installed     yum-3.4.3-125.el7.noarch                @rhui-REGION-rhel-server-releases 
-    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64 @anaconda/7.0 
-Packages Altered: 
-    Dep-Install openscap-1.1.1-3.el7.x86_64             @rhui-REGION-rhel-server-releases 
-    Dep-Install openscap-scanner-1.1.1-3.el7.x86_64     @rhui-REGION-rhel-server-releases 
-    Install     scap-security-guide-0.1.19-2.el7.noarch @rhui-REGION-rhel-server-releases 
-history info 
-</code> 
- 
-\\ 
-3) Undo the group install (removes installed packages) 
-<code bash> 
-yum history undo 25 
-</code> 
- 
----- 
- 
-===== RPM (Redhat Package Manager) ===== 
- 
-Use yum downloader to download RPM 
-<code bash> 
-yumdownloader nano 
-</code> 
- 
-\\ 
-Install package 
-<code bash> 
-rpm -ivh nano-2.3.1-10.el7.x86_64.rpm 
-</code> 
-  * i - install 
-  * v - verbose 
-  * h - hash progress bar 
- 
-\\ 
-List all installed rpm packages 
-<code bash> 
-rpm -qa 
-</code> 
-  * q - query 
-  * a - all 
- 
-\\ 
-List all files installed as part of package 
-<code bash> 
-rpm -ql nano 
-</code> 
-  * l - list files 
- 
-\\ 
-List all files that are part of a local RPM file that is not installed yet 
-<code bash> 
-rpm -qlp nano-2.3.1-10.el7.x86_64.rpm 
-</code> 
- 
-\\ 
-List documentation files for a package 
-<code bash> 
-rpm -qd nano 
-</code> 
-  * d - documentation files 
- 
-\\ 
-List configuration files for a package 
-<code bash> 
-rpm -qc nano 
-</code> 
-  * c - configuration files 
- 
-\\ 
-Remove package 
-<code bash> 
-rpm -e nano 
-</code> 
-  * -e => erase 
- 
-\\ 
-Install local rpm, auto install dependencies 
-<code bash> 
-yum install nano-2.3.1-10.el7.x86_64.rpm 
-</code> 
-  * 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.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)