zoukankan      html  css  js  c++  java
  • centos6.*yum源更新

    [1] 首先备份

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

    [2]编辑vi /etc/yum.repos.d/Centos-ISO.repo

    163源:

    [base]
    name=CentOS-6 - Base - 163.com
    baseurl=http://mirrors.163.com/centos/6/os/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #released updates
    [updates]
    name=CentOS-6 - Updates - 163.com
    baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that may be useful
    [extras]
    name=CentOS-6 - Extras - 163.com
    baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
    gpgcheck=1
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-6 - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-6 - Contrib - 163.com
    baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
    #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
    gpgcheck=1
    enabled=0
    gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

    [4] 运行yum makecache生成缓存

    [root@localhost yum.repos.d]# yum makecache

    [5] 更新系统

    [root@localhost yum.repos.d]# yum -y update

    [6] 安装vim编辑器

    [root@localhost ~]# yum -y install vim*
  • 相关阅读:
    小米2/2S 手机由 Smartisan OS ROM 刷回 MIUI 教程
    Java构造和解析Json数据的两种方法详解二
    python-数据类型(上):数字、布尔值、字符串、字典
    python的介绍与安装
    PyCharm快捷键
    PyCharm安装模块
    PyCharm安装
    mac如何获取文件路径
    mac常用快捷键
    linux常用命令
  • 原文地址:https://www.cnblogs.com/wuweidong/p/6808165.html
Copyright © 2011-2022 走看看