yum-config-manager --enable CentOS-Media查看數據倉庫狀態若爲禁用則需要做啓用

[root@ora11g yum.repos.d]# yum update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>
[root@ora11g yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
repo id                                                repo name                                              status
CentOS-Media                                           CentOS-Media                                           disabled
repolist: 0
[root@ora11g yum.repos.d]# yum-config-manager --enable CentOS-Media
Loaded plugins: fastestmirror, langpacks
================================================= repo: CentOS-Media =================================================
[CentOS-Media]
async = True
bandwidth = 0
base_persistdir = /var/lib/yum/repos/x86_64/7
baseurl = file:///root/centos_iso/
cache = 0
cachedir = /var/cache/yum/x86_64/7/CentOS-Media
check_config_file_age = True
compare_providers_priority = 80
cost = 1000
deltarpm_metadata_percentage = 100
deltarpm_percentage =
enabled = 1
enablegroups = True
exclude =
failovermethod = priority
ftp_disable_epsv = False
gpgcadir = /var/lib/yum/repos/x86_64/7/CentOS-Media/gpgcadir
gpgcakey =
gpgcheck = False
gpgdir = /var/lib/yum/repos/x86_64/7/CentOS-Media/gpgdir
gpgkey =
hdrdir = /var/cache/yum/x86_64/7/CentOS-Media/headers
http_caching = all
includepkgs =
ip_resolve =
keepalive = True
keepcache = False
mddownloadpolicy = sqlite
mdpolicy = group:small
mediaid =
metadata_expire = 21600
metadata_expire_filter = read-only:present
metalink =
minrate = 0
mirrorlist =
mirrorlist_expire = 86400
name = CentOS-Media
old_base_cache_dir =
password =
persistdir = /var/lib/yum/repos/x86_64/7/CentOS-Media
pkgdir = /var/cache/yum/x86_64/7/CentOS-Media/packages
proxy = False
proxy_dict =
proxy_password =
proxy_username =
repo_gpgcheck = False
retries = 10
skip_if_unavailable = False
ssl_check_cert_permissions = True
sslcacert =
sslclientcert =
sslclientkey =
sslverify = True
throttle = 0
timeout = 30.0
ui_id = CentOS-Media
ui_repoid_vars = releasever,
   basearch
username =

[root@ora11g yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
file:///root/centos_iso/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /root/centos_iso/repodata/repomd.xml"
Trying other mirror.
file:///root/centos_iso/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /root/centos_iso/repodata/repomd.xml"
Trying other mirror.
repo id                                               repo name                                             status
CentOS-Media                                          CentOS-Media                                          enabled: 0
repolist: 0
[root@ora11g yum.repos.d]#

之後再執行更新即可正常使用

[root@ora11g yum.repos.d]# yum update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
CentOS-Media                                                                                   | 3.6 kB  00:00:00     
(1/2): CentOS-Media/group_gz                                                                   | 166 kB  00:00:00     
(2/2): CentOS-Media/primary_db                                                                 | 3.1 MB  00:00:00     
No packages marked for update
[root@ora11g yum.repos.d]#

[root@ora11g yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, langpacks
Cleaning repos: CentOS-Media
Cleaning up list of fastest mirrors
[root@ora11g yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
CentOS-Media                                                                                   | 3.6 kB  00:00:00     
(1/4): CentOS-Media/group_gz                                                                   | 166 kB  00:00:00     
(2/4): CentOS-Media/primary_db                                                                 | 3.1 MB  00:00:00     
(3/4): CentOS-Media/filelists_db                                                               | 3.2 MB  00:00:00     
(4/4): CentOS-Media/other_db                                                                   | 1.3 MB  00:00:00     
Metadata Cache Created
[root@ora11g yum.repos.d]#

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章