zoukankan      html  css  js  c++  java
  • yum源 epel源 no package available 更换国内yum源

    有时候安装软件会出现 no package available  

    解决办法:yum install epel-release

    安装完会在/etc/yum.repos.d/目录下下生成两个repo文件:

    /etc/yum.repos.d/epel.repo              正式稳定版 
    /etc/yum.repos.d/epel-testing.repo  测试版软件,性能不稳定,有安全隐患

    默认情况下,只有正式版是有效状态的,

    如果你想试试测试版的话,需要修改/etc/yum.repos.d/epel-testing.repo,把enabled=0改成enabled=1即可。

    如果你暂时不想使用EPEL的yum源的话,把对应文件里的enabled=1改成enabled=0就行了

    如果你完全不需要了,那就直接卸载掉:

    rpm -e epel-release

     

    更换centos自带的yum源为阿里云的yum源,自带的源 地址在国外,下载速度慢

    1、备份

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

    2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

    CentOS 5

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

    CentOS 6

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

    CentOS 7

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

    3、之后运行yum makecache生成缓存

     

    参考地址http://mirrors.aliyun.com/help/centos

     

     

  • 相关阅读:
    mybatis05--多条件的查询
    mybatis04--Mapper动态代理实现
    mybatis03--字段名和属性名不一致
    mybatis02--增删改查
    myBatis01
    hibernate12--缓存
    hibernate11--Criteria查询
    hibernate10--命名查询
    hibernate09--连接查询
    (转载)閱讀他人的程式碼(5)找到程式入口,再由上而下抽絲剝繭
  • 原文地址:https://www.cnblogs.com/fanren224/p/8457324.html
Copyright © 2011-2022 走看看