zoukankan      html  css  js  c++  java
  • Fedora 添加国内源(sohu, 163)

    第一种方案

    在国内163和搜狐提供很好的源,现在我们把它们俩添加到我们的源库。
    1. 添加搜狐的源
    进入网站http://mirrors.sohu.com/,在左边找到fedora目录,点击该行右边的help, 然后

    下载fedora-sohu.repo和fedora-updates-sohu.repo, 放入/etc/yum.repos.d/

    运行yum makecache生成缓存

    2.  添加163的源

    进入网站 http://mirrors.163.com/,在左边找到fedora目录,点击改行右边的使用帮助,然后

    下载fedora-163.repo和fedora-updates-163.repo, 放入/etc/yum.repos.d/

    运行yum makecache生成缓存

    现在你可以运行命令 ls /etc/yum.repos.d 看看该目录下是不是多了两个源了呢, Fedora13下添加163和搜狐的源 - Carya - 境天,另一片天

    第二种方案

    # vi /etc/yum.repos.d/fedora-cn.repo
    =============================================================================
    [fedora-mirrors.sohu.com]
    name=Fedora $releasever - $basearch - sohu.com
    failovermethod=priority
    baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/$basearch/os/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
    enabled=1
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    [fedora-debuginfo-mirrors.sohu.com]
    name=Fedora $releasever - $basearch - Debug - sohu.com
    failovermethod=priority
    baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/$basearch/debug/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    [fedora-source-mirrors.sohu.com]
    name=Fedora $releasever - Source - sohu.com
    failovermethod=priority
    baseurl=http://mirrors.sohu.com/fedora/releases/$releasever/Everything/source/SRPMS/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    [fedora-mirrors.163.com]
    name=Fedora $releasever - $basearch - 163.com
    failovermethod=priority
    baseurl=http://mirrors.163.com/fedora/releases/$releasever/Everything/$basearch/os/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
    enabled=1
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    [fedora-debuginfo-mirrors.163.com]
    name=Fedora $releasever - $basearch - Debug - 163.com
    failovermethod=priority
    baseurl=http://mirrors.163.com/fedora/releases/$releasever/Everything/$basearch/debug/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    [fedora-source-mirrors.163.com]
    name=Fedora $releasever - Source - 163.com
    failovermethod=priority
    baseurl=http://mirrors.163.com/fedora/releases/$releasever/Everything/source/SRPMS/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
    enabled=0
    metadata_expire=7d
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

    =============================================================================

    # vi /etc/yum.repos.d/fedora-update-cn.repo
    =============================================================================
    [updates-mirrors.sohu.com]
    name=Fedora $releasever - $basearch - Updates - sohu.com
    failovermethod=priority
    baseurl=http://mirrors.sohu.com/fedora/updates/$releasever/$basearch/
    mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

  • 相关阅读:
    C# 获得 当年1月1号
    Mybatis快速入门
    maven项目无法读取src/main/java目录下的配置文件解决方法
    Jenkins之手动安装
    Ubuntu17安装maven3.5.2
    Ubuntu17安装Jenkins
    Spring之事务操作(注解)
    Spring之事务操作(配置文件)
    Spring之配置文件中引入其它配置文件
    【转】maven常用插件介绍
  • 原文地址:https://www.cnblogs.com/bo083/p/2152792.html
Copyright © 2011-2022 走看看