zoukankan      html  css  js  c++  java
  • 更改CentOS 6.3 yum源为国内 阿里云源

    将CentOS的 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

    CentOS 163 yum源使用:

    1、先关闭 fastestmirror

    vim /etc/yum/pluginconf.d/fastestmirror.conf

    设置 enable=0

    2、先备份  /etc/yum.repos.d/CentOS-Base.repo

    cd /etc/yum.repos.d
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old

    3、进入 http://mirrors.163.com/.help/centos.html 下载 CentOS6-Base-163.repo,放入 /etc/yum.repos.d/

    wget  -c  http://mirrors.163.com/.help/CentOS6-Base-163.repo

    4、生成缓存

    yum makecache

    其他命令参考:

    1、yum search  softwarename  查找软件

    2、yum list  softwarename  列出已装软件

    3、yum install  softwarename  安装软件

    4、yun remove  softwarename  卸载软件

  • 相关阅读:
    重视需求
    某2个人的qq对话
    公司安全提示
    需求实施心得
    项目远景
    发布系统应注意的几小点问题
    把握项目开发的节奏
    Css介绍
    调研工作的思路
    网,无处不在
  • 原文地址:https://www.cnblogs.com/52php/p/5666509.html
Copyright © 2011-2022 走看看