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*
  • 相关阅读:
    如何在宿主机上查看kvm虚拟机的IP
    virt-viewer 连kvm 虚机
    用virsh console vhosts 卡住
    sshpass 实现shell脚本直接加载密登录服务器
    maven创建helloword项目
    linux 安装maven
    xz -d Python-3.4.7.tar.xz
    查看哪个用户登录过服务器 记录 时间 和 ip
    两台linux服务器各有两个不同的用户 其中一个服务器可以无密码登录服务器
    maven私服nexus
  • 原文地址:https://www.cnblogs.com/wuweidong/p/6808165.html
Copyright © 2011-2022 走看看