Differences
This shows you the differences between two versions of the page.
Next revision Both sides next 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 [2016/02/29 21:54] billdozor [RPM (Redhat Package Manager)] |
||
---|---|---|---|
Line 185: | Line 185: | ||
</ | </ | ||
* 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 | ||
+ | * / | ||
+ | * file must end in " | ||
+ | |||
+ | Show all enabled repos | ||
+ | <code bash> | ||
+ | yum repolist | ||
+ | </ | ||
+ | |||
+ | Show all enabled and disabled repos | ||
+ | <code bash> | ||
+ | yum repolist all | ||
+ | </ | ||
+ | |||
+ | === yum config manager === | ||
+ | Add new repo | ||
+ | <code bash> | ||
+ | yum-config-manager --add-repo=http:// | ||
+ | </ | ||
+ | |||
+ | 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_ | ||
+ | </ | ||
+ | |||
+ | Remove repo | ||
+ | <code bash> | ||
+ | rm -f / | ||
+ | </ | ||
+ | |||
+ | === repos via config files === | ||
+ | Add new repo; create new file in / | ||
+ | <code bash> | ||
+ | vim / | ||
+ | |||
+ | [EPEL7] | ||
+ | name=Fedora EPEL 7 | ||
+ | baseurl=http:// | ||
+ | enabled=1 | ||
+ | </ | ||
+ | * [EPEL7] => repo id | ||
+ | * Fedora EPEL 7 => repo name | ||
+ | |||
+ | Disable repo by editing repo file | ||
+ | <code bash> | ||
+ | vim / | ||
+ | |||
+ | enabled=0 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Configuring A Local Repository ==== | ||
+ | |||
+ | Setup directory and mount iso | ||
+ | <code bash> | ||
+ | mkdir -p / | ||
+ | mount -o loop rhel-server-7.1-x86_64-dvd.iso / | ||
+ | </ | ||
+ | |||
+ | Create local repo config file | ||
+ | <code bash> | ||
+ | cd / | ||
+ | vim local-repo.repo | ||
+ | |||
+ | [local-repo] | ||
+ | name=Red Hat Linux Local Repo | ||
+ | baseurl=file:/// | ||
+ | enabled=1 | ||
+ | gpgcheck=0 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Configure The GPG Key ==== | ||
+ | |||
+ | Download gpg key from repo | ||
+ | <code bash> | ||
+ | cd / | ||
+ | wget http:// | ||
+ | </ | ||
+ | |||
+ | Add gpg check and key to repo config | ||
+ | <code bash> | ||
+ | cd / | ||
+ | vim dl.fedoraproject.org_pub_epel_7_x86_64_.repo | ||
+ | |||
+ | gpgcheck=1 | ||
+ | gpgkey=file:/// | ||
+ | </ | ||
---- | ---- | ||