每个仓库都有多个渠道,比如测试(Testing)、开发(Dev)和存档(Archive)等。通过导航到仓库文件位置,你可以更好地理解这一点。
# ls -lh /etc/yum.repos.d total 64K -rw-r--r-- 1 root root 2.0K Apr 12 02:44 CentOS-Base.repo -rw-r--r-- 1 root root 647 Apr 12 02:44 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 289 Apr 12 02:44 CentOS-fasttrack.repo -rw-r--r-- 1 root root 630 Apr 12 02:44 CentOS-Media.repo -rw-r--r-- 1 root root 916 May 18 11:07 CentOS-SCLo-scl.repo -rw-r--r-- 1 root root 892 May 18 10:36 CentOS-SCLo-scl-rh.repo -rw-r--r-- 1 root root 6.2K Apr 12 02:44 CentOS-Vault.repo -rw-r--r-- 1 root root 7.9K Apr 12 02:44 CentOS-Vault.repo.rpmnew -rw-r--r-- 1 root root 957 May 18 10:41 epel.repo -rw-r--r-- 1 root root 1.1K Nov 4 2012 epel-testing.repo -rw-r--r-- 1 root root 1.2K Feb 23 2017 ius-archive.repo -rw-r--r-- 1 root root 1.2K Feb 23 2017 ius-dev.repo -rw-r--r-- 1 root root 1.1K May 18 10:41 ius.repo -rw-r--r-- 1 root root 1.2K Feb 23 2017 ius-testing.repo
如何在系统中启用一个仓库
当你在默认情况下添加一个新仓库时,它将启用它们的稳定仓库,这就是为什么我们在运行 yum repolist 命令时获取了仓库信息。在某些情况下,如果你希望启用它们的测试、开发或存档仓库,使用以下命令。另外,,我们还可以使用此命令启用任何禁用的仓库。
为了验证这一点,我们将启用 epel-testing.repo ,运行下面的命令:
# yum-config-manager --enable epel-testing -
Loaded plugins: fastestmirror ==================================================================================== repo: epel-testing ===================================================================================== [epel-testing] bandwidth = 0 base_persistdir = /var/lib/yum/repos/x86_64/6 baseurl = cache = 0 cachedir = /var/cache/yum/x86_64/6/epel-testing cost = 1000 enabled = 1 enablegroups = True exclude = failovermethod = priority ftp_disable_epsv = False gpgcadir = /var/lib/yum/repos/x86_64/6/epel-testing/gpgcadir gpgcakey = gpgcheck = True gpgdir = /var/lib/yum/repos/x86_64/6/epel-testing/gpgdir gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 hdrdir = /var/cache/yum/x86_64/6/epel-testing/headers http_caching = all includepkgs = keepalive = True mdpolicy = group:primary mediaid = metadata_expire = 21600 metalink = mirrorlist = https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=x86_64 mirrorlist_expire = 86400 name = Extra Packages for Enterprise Linux 6 - Testing - x86_64 old_base_cache_dir = password = persistdir = /var/lib/yum/repos/x86_64/6/epel-testing pkgdir = /var/cache/yum/x86_64/6/epel-testing/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 username =
(编辑:ASP站长网)
|