zoukankan      html  css  js  c++  java
  • OS: CentOS8本地源配置过程

    CentOS8-stream 本地源配置

     


    一、配置软件仓库(软件仓库位置:/media/CentOS)


    1、建立目录 “CentOS” 。(mkdir -p /media/CentOS)


    2、挂载光盘“CentOS-Stream-8-x86_64-20210506-dvd1.iso”。


    3、将光盘文件夹“AppStream”、“BaseOS” 复制到 “/media/CentOS”目录。
        (cp    -r     AppStream/    BaseOS/           /media/CentOS

     

    二、配置软件仓库文件(/etc/yum.repos.d/)


    1、查看本地源配置文件:


    [root@centos yum.repos.d]# cat CentOS-Stream-Media.repo
    # CentOS-Stream-Media.repo
    #
    # You can use this repo to install items directly off the installation media.
    # Verify your mount point matches one of the below file:// paths.

    [media-baseos]
    name=CentOS Stream $releasever - Media - BaseOS
    baseurl=file:///media/CentOS/BaseOS
    file:///media/cdrom/BaseOS
    file:///media/cdrecorder/BaseOS
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

    [media-appstream]
    name=CentOS Stream $releasever - Media - AppStream
    baseurl=file:///media/CentOS/AppStream
    file:///media/cdrom/AppStream
    file:///media/cdrecorder/AppStream
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
    [root@centos yum.repos.d]#


    2、开启仓库,将 “enabled=0”, 改为“enabled=1”

     

    三、测试本地源仓库:

     

    [root@centos yum.repos.d]# dnf clean all
    13 files removed
    [root@centos yum.repos.d]# dnf makecache
    CentOS Stream 8 - Media - BaseOS 68 MB/s | 2.5 MB 00:00
    CentOS Stream 8 - Media - AppStream 72 MB/s | 7.1 MB 00:00
    Last metadata expiration check: 0:00:01 ago on Sat 22 May 2021 03:31:48 PM CST.
    dnf Metadata cache created.
    [root@centos yum.repos.d]# dnf grouplist
    Last metadata expiration check: 0:00:13 ago on Sat 22 May 2021 03:31:48 PM CST.
    Available Environment Groups:
    Server
    Minimal Install
    Workstation
    Custom Operating System
    Virtualization Host
    Installed Environment Groups:
    Server with GUI
    Installed Groups:
    Container Management
    Headless Management
    Available Groups:
    Legacy UNIX Compatibility
    Development Tools
    .NET Core Development
    Graphical Administration Tools
    Network Servers
    RPM Development Tools
    Scientific Support
    Security Tools
    Smart Card Support
    System Tools
    [root@centos yum.repos.d]#

     

     

    本文由lnlidawei(https://www.cnblogs.com/lnlidawei)原创或整理,转载请注明出处。
  • 相关阅读:
    String.getBytes()未设置字符集导致打印的pdf乱码
    git更新代码报错,error: The following untracked working tree files would be overwritten by ch
    thinkpad X1 extreme 安装Ubuntu 18.04.2 LTS
    plsql的sql窗口中文模糊查询没有作用
    mysql 触发器和存储过程组合使用,实现定时触发操作
    css 实现table 隔行变色
    meta标签详解:源http://blog.csdn.net/kongjiea/article/details/17092413
    Spring+Quartz实现定时任务的配置方法
    ECToch随笔
    转载:ecshop自定义销量
  • 原文地址:https://www.cnblogs.com/lnlidawei/p/14799050.html
Copyright © 2011-2022 走看看