redhat6.4配置本地yum源


1.创建挂载目录、仓库目录

mkdir -p  /mnt/cdrom

mkdir -p /home/soft

2.挂载镜像

mount /dev/cdrom /mnt/cdrom

3.复制数据

cp -rf /mnt/cdrom/* /home/soft

4.更改配置文件

cd /etc/yum.repos.d

cp rhel-source.repo  rhel-source.repo.bak

vi  rhel-source.repo

[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///home/soft    #把路径指向本地光盘即可
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

5.清除yum缓存

yum clean all

6.制作新的缓存

yum make cache

7.测试是否成功

yum grouplist|grep Devel

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.    
  Additional Development
  Desktop Platform Development
  Development tools
  Server Platform Development

现在就可以yum安装软件了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM