zoukankan      html  css  js  c++  java
  • RHEL7配置yum源仓库

    1、查看本身系统的安装包

    rpm -qa | grep yum

    2、卸载系统本身的yum

    rpm -qa | grep yum | xargs rpm -e --nodeps #不检查依赖关系,直接卸载

    3、从网络上下载yum安装包,由于国内yum的多多少少有兼容问题,从国外下载了相关包

    yum-utils-1.1.31-34.el7.noarch.rpm
    yum-updateonboot-1.1.31-34.el7.noarch.rpm
    yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
    yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    yum-3.4.3-132.el7.centos.0.1.noarch.rpm

    4、相关安装包百度网盘分享资料

    链接:https://pan.baidu.com/s/1g3taaQDGqlWsRc7RrdcIGg 
    提取码:1pja 
    

    5、将这些安装包传到linux系统的同一个目录下,使用winscap软件

    链接:https://pan.baidu.com/s/13N8DZocShprzRKtrRCRKAQ 
    提取码:s0pu

    6、安装所有包

    rpm -ivh *
    rpm -qa | grep yum # 查询是否安装好

    7、安装成功后,添加如下内容到/etc/yum.repos.d/xx.repo的文件下

    [base]
    name= base
    baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
    enabled=1
    gpgcheck=0

    8、保存退出,使用yum makecache缓存

    9、使用yum repolist all查看

    [root@csm redhat7可用centos yum安装包]# yum repolist all
    Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    Repository base is listed more than once in the configuration
    Repository updates is listed more than once in the configuration
    Repository extras is listed more than once in the configuration
    Repository centosplus is listed more than once in the configuration
    Loading mirror speeds from cached hostfile
    repo id                               repo name                                         status
    base/x86_64                           CentOS-$7 - Base - 163.com                        enabled: 10,097
    centosplus/x86_64                     CentOS-$7 - Plus - 163.com                        disabled
    extras/x86_64                         CentOS-$7 - Extras - 163.com                      enabled:    335
    updates/x86_64                        CentOS-$7 - Updates - 163.com                     enabled:  1,774
    repolist: 12,206

     

  • 相关阅读:
    centos 7 安装Telnet并设为开机自启动、开防火墙端口
    cenos 7 中firewalld开放服务端口
    来自鸟哥的lftp客户端软件使用方法
    关闭Linux无用端口
    家用路由器网络设置DMZ区
    Linux中退出循环命令
    shell函数基本概念
    inode节点用尽处理
    xfs格式化、ext4格式化并指定inode区别
    dd备份命令使用
  • 原文地址:https://www.cnblogs.com/csms/p/13589542.html
Copyright © 2011-2022 走看看