redhat7.3安裝yum源
阿新 • • 發佈:2018-12-10
#檢查rehat自帶的yum源[[email protected] ~]# rpm -qa | grep yum yum-langpacks-0.4.2-7.el7.noarch yum-3.4.3-150.el7.noarch yum-rhn-plugin-2.0.1-6.el7.noarch yum-utils-1.1.31-40.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64
解除安裝redhat自帶的yum源
[[email protected] ~]# rpm -e yum-langpacks-0.4.2-7.el7.noarch --nodeps warning:/etc/yum/pluginconf.d/langpacks.conf saved as /etc/yum/pluginconf.d/langpacks.conf.rpmsave [[email protected] ~]# rpm -e yum-3.4.3-150.el7.noarch --nodeps [[email protected] ~]# rpm -e yum-rhn-plugin-2.0.1-6.el7.noarch --nodeps [[email protected] ~]# rpm -e yum-utils-1.1.31-40.el7.noarch --nodeps [[email protected] ~]# rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
檢查是否充分解除安裝
[[email protected] ~]# rpm -qa | grep yum
通過網易來源網站下載rpm檔案
[[email protected] yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
[[email protected]yum]# wget http://vault.centos.org//centos/7.3.1611/os/x86_64/Packages/yum-updateonboot-1.1.31-40.el7.noarch.rpm [[email protected] yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-utils-1.1.31-40.el7.noarch.rpm [[email protected] yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm [[email protected] yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm
rpm安裝
[[email protected] yum]# rpm -ivh yum-* warning: yum-3.4.3-150.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:yum-metadata-parser-1.1.4-10.el7 ################################# [ 20%] 2:yum-plugin-fastestmirror-1.1.31-4################################# [ 40%] 3:yum-3.4.3-150.el7.centos ################################# [ 60%] 4:yum-updateonboot-1.1.31-40.el7 ################################# [ 80%] 5:yum-utils-1.1.31-40.el7 ################################# [100%]
配置repo檔案
[[email protected] yum]# vim /etc/yum.repos.d/CentOS-Base.repo
檢查/etc/yum.repos.d目錄下只有一個CentOS-Base.repo起作用
yum clean all
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Cleaning repos: base extras updatesCleaning up everything
檢測可以用