Chinaunix首页 | 论坛 | 博客
  • 博客访问: 809630
  • 博文数量: 135
  • 博客积分: 3477
  • 博客等级: 中校
  • 技术积分: 1389
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-30 21:53
文章分类

全部博文(135)

文章存档

2024年(6)

2023年(10)

2022年(4)

2021年(10)

2020年(9)

2018年(1)

2017年(1)

2014年(4)

2013年(3)

2012年(12)

2011年(24)

2010年(2)

2009年(8)

2008年(6)

2007年(34)

2006年(1)

分类: LINUX

2024-09-21 14:14:07

RedHat 9 改变了以往的授权模式,使得用户必须要运行 rhc 进行注册激活,否则在系统安装完成后,由于我们的 rhel 系统在多数情况下,都是处于内网环境,无法通过 rhc 到红帽子的官方网站上进行注册,而且很多的时候,由于我们是在内网环境下,我们也不需要持续更新,相较而言,系统稳定才是{BANNED}中国第一位的,这样一来,即使是简单的软件安装也变得异常麻烦,极为不便。

实际上,我们所需要的大多数软件,都是可以通过 RHEL9 的安装介质进行安装的。那么有没有办法通过搭建本地软件仓库源的方式来实现软件的追加安装呢,办法是有的,只是麻烦了一些。

方法如下:

step 1:创建本地软件仓库文件目录

点击(此处)折叠或打开

  1. # mkdir /media/RHEL
step 2:  挂载光盘镜像到本地软件仓库目录

点击(此处)折叠或打开

  1. # mount -r /dev/cdrom /media/RHEL
step 3:  编写本地软件仓库源配置文件  /etc/yum.repos.d/rhel-media.repo

点击(此处)折叠或打开

  1. # vi /etc/yum.repos.d/rhel-media.repo
    内容如下:

点击(此处)折叠或打开

  1. # redhat-Media.repo
  2. #
  3. # This repo can be used with mounted DVD media, verify the mount point for
  4. # RedHat-9. You can use this repo and yum to install items directly off the
  5. # DVD ISO that we release.
  6. #
  7. # To use this repo, put in your DVD and use it with the other repos too:
  8. # yum --enablerepo=c7-media [command]
  9. #
  10. # or for ONLY the media repo, do this:
  11. #
  12. # yum --disablerepo=\* --enablerepo=redhat9-BaseOS [command]
  13. [redhat9-BaseOS]
  14. name=REDHAT-$releasever - Media
  15. baseurl=file:///media/RHEL/BaseOS
  16. file:///media/cdrom/
  17. file:///media/cdrecorder/
  18. gpgcheck=1
  19. enabled=1
  20. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  21. [redhat9-AppStream]
  22. name=REDHAT-$releasever - Media
  23. baseurl=file:///media/RHEL/AppStream
  24. file:///media/cdrom/
  25. file:///media/cdrecorder/
  26. gpgcheck=1
  27. enabled=1
  28. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
step 4:重建软件仓库源缓存

点击(此处)折叠或打开

  1. # dnf clean
  2. # dnf makecache

阅读(20) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~