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)原创或整理,转载请注明出处。
  • 相关阅读:
    HDU-1875-畅通工程再续(最小生成树)
    HDU-1325-Is It A Tree?(并查集+有向树)
    HDU-2473-Junk-Mail Filter(并查集删除)
    HDU-1233-还是畅通工程(最小生成树)
    POJ-2492-A Bug's Life(并查集分类)
    asp.net core 中KindEditor的使用
    使用FormsAuthenticationTicket进行登陆验证
    c#生成随机字符串
    string.Format对C#字符串格式化
    在Ubuntu上使用noip动态域名的方法(ddns)
  • 原文地址:https://www.cnblogs.com/lnlidawei/p/14799050.html
Copyright © 2011-2022 走看看