zoukankan      html  css  js  c++  java
  • Linux 6.4 设置yum 为centOS源

    一、 删除Redhat 自带的yum 

    // root 用户执行

    rpm -aq|grep yum|xargs rpm -e --nodeps   

    二 、下载CentOS 的 yum 安装文件 

    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm 
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm 
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm 
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

    三、安装yum

    rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm 
    rpm -ivh yum-metadata-parser-1.1.2-14.1.el6.x86_64.rpm 
    rpm -ivh yum-3.2.27-14.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm

    最后两个rpm包需要同时安装

    四、更新repo文件

    vi /etc/yum.repos.d/rhel-debuginfo.repo

    将以下内容张贴到rhel-debuginfo.repo中

    [base]
    name=CentOS-$releasever - Base
    baseurl=http://mirrors.163.com/centos/6.0/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

    #released updates
    [updates]
    name=CentOS-$releasever - Updates
    baseurl=http://mirrors.163.com/centos/6.0/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

    #packages used/produced in the build but not released
    #[addons]
    #name=CentOS-$releasever - Addons
    #baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
    #gpgcheck=1
    #gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    baseurl=http://mirrors.163.com/centos/6.0/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    baseurl=http://mirrors.163.com/centos/6.0/centosplus/$basearch/
    gpgcheck=1
    enabled=0

    五、yum clean all 

    六、yum install vim #测试一下可不可以用

  • 相关阅读:
    接口和抽象类的异同点
    实体对象间传值克隆
    什么是反射&反射的8个类的用法
    ERP中反射的两个实例
    基础02 Java 跨平台原理
    基础01 dos命令
    lists删除
    多字段 java对象排序
    Java对象排序
    MySQL表中数据的迁移
  • 原文地址:https://www.cnblogs.com/piepie/p/3836673.html
Copyright © 2011-2022 走看看