avatar

刘刚刚的blog

采菊东篱下,悠然见南山🦥

  • 首页
  • 大模型应用
  • 常用软件/工具
  • Halo
  • 关于
Home <linux就该这么学>RHEL8配置软件仓库
文章

<linux就该这么学>RHEL8配置软件仓库

Posted 2021-06-27 Updated 2024-12- 17
By Administrator
5~7 min read

RHEL8配置软件仓库


RHEL8配置软件仓库(yum源)

  1. 给虚拟机添加光盘文件

    image-20210329233613218

  2. 挂载光盘文件到目录

    # 创建挂载点
    mkdir /media/cdrom
    
    # 挂载
    [root@localhost media]# vim /etc/fstab
    ## 在最后添加如下内容
    /dev/cdrom /media/cdrom iso9660 defaults 0 0
    [root@localhost media]# mount -a
    mount: /media/cdrom: WARNING: device write-protected, mounted read-only.
    
    
  3. 配置yum仓库的文件

    # 进入目录
    [root@localhost media]# cd /etc/yum.repos.d/
    # yum配置文件的名称随意,结尾为repo即可
    [root@localhost media]# vim readhat.repo
    
    # 写入文件内容
    [BaseOS]
    name=BaseOS
    baseurl=file:///media/cdrom/BaseOS
    gpgheck=0
    enabled=1
    [AppStream]
    name=AppStream
    baseurl=file:///media/cdrom/AppStream
    gpgcheck=0
    enabled=1
    
  4. 使用yum /dnf安装软件

    yum  install 软件包名称

tip:

如果出现以下错误:

[root@localhost media]# dnf install tmux
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
 rpm --import public.gpg.key

可以使用rpm --import public.gpg.key解决

配置阿里云yum源的方式

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

当有多个yum源存在时,linux提供有配置优先级的插件(需要安装)

运维
linux就该这么学
License:  CC BY 4.0
Share

Further Reading

Feb 5, 2025

Docker的常用命令

Docker的常用命令 # 镜像列表 docker images ​ # 容器列表 docker ps # 设置镜像源 ​ # 进入容器内部 docker exec -it {容器id} /bin/bash #或者 docker exec -it {容器id} /bin/sh # 查看镜

Dec 27, 2024

centos切换阿里云Yum源

centos默认的yum源是国外的,国内使用的时候速度会比较慢,可以选择切换为阿里yum源。 切换Yum源 # 1.下载aliyun yum源repo文件 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo

Dec 8, 2021

supervior安装及配置

supervior支持多种安装方式,本文介绍了pip安装的方式。

OLDER

<linux就该这么学>第九章 使用ssh管理远程主机

NEWER

<linux就该这么学> 第10章 使用Apache服务部署静态网站

Recently Updated

  • 文本切分-语义分割(Semantic Chunking)
  • dify 并发配置优化
  • Typing
  • 大模型返回中json_schema与json_mode的区别
  • Async

Trending Tags

Halo 运维 postgresql 设计模式 linux就该这么学 nas rag odoo python 文本切分

Contents

©2025 刘刚刚的blog. Some rights reserved.

Using the Halo theme Chirpy