博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
本地yum源配置
阅读量:6609 次
发布时间:2019-06-24

本文共 6658 字,大约阅读时间需要 22 分钟。

hot3.png

本地yum源配置

由于单位的服务器均使用的是内网,由于不能联网故配置本地yum源配置。

1. 挂载ISO镜像文件:

将ISO镜像文件上传到服务器上,创建挂载目录。

[root@zabbix /]# mkdir linux_iso[root@zabbix linux_iso]# mount -o loop rhel-server-6.7-x86_64-dvd.iso /media[root@zabbix linux_iso]# ll /mediatotal 869dr-xr-xr-x.  3 root root   2048 Jul  2  2015 EFI-r--r--r--.  1 root root   8724 Nov  7  2012 EULA-r--r--r--.  1 root root  10726 Nov  7  2012 EULA_de-r--r--r--.  1 root root   8724 Nov  7  2012 EULA_en-r--r--r--.  1 root root  10846 Nov  7  2012 EULA_es-r--r--r--.  1 root root  10682 Nov  7  2012 EULA_fr-r--r--r--.  1 root root  10497 Nov  7  2012 EULA_it-r--r--r--.  1 root root  13173 Nov  7  2012 EULA_ja-r--r--r--.  1 root root   9841 Nov  7  2012 EULA_ko-r--r--r--.  1 root root  10033 Nov  7  2012 EULA_pt-r--r--r--.  1 root root   7306 Nov  7  2012 EULA_zh-r--r--r--.  1 root root  18092 Jun 30  2010 GPLdr-xr-xr-x.  3 root root  12288 Jul  2  2015 HighAvailabilitydr-xr-xr-x.  3 root root   2048 Jul  2  2015 imagesdr-xr-xr-x.  2 root root   2048 Jul  2  2015 isolinuxdr-xr-xr-x.  3 root root   2048 Jul  2  2015 LoadBalancer-r--r--r--.  1 root root    114 Jul  2  2015 media.repodr-xr-xr-x.  2 root root 690176 Jul  2  2015 Packages-r--r--r--.  1 root root  16435 Sep  2  2010 READMEdr-xr-xr-x. 25 root root   6144 Jul  2  2015 release-notesdr-xr-xr-x.  2 root root   4096 Jul  2  2015 repodatadr-xr-xr-x.  3 root root  14336 Jul  2  2015 ResilientStorage-r--r--r--.  1 root root   3375 Jun 12  2015 RPM-GPG-KEY-redhat-beta-r--r--r--.  1 root root   3211 Jun 12  2015 RPM-GPG-KEY-redhat-releasedr-xr-xr-x.  3 root root   2048 Jul  2  2015 ScalableFileSystemdr-xr-xr-x.  3 root root   2048 Jul  2  2015 Server-r--r--r--.  1 root root   3757 Jul  2  2015 TRANS.TBL[root@zabbix linux_iso]#

 

2.进入到 /etc/yum.repos.d/  :

1、利用现有文件,复制一个redhat-media.repo

[root@zabbix yum.repos.d]# cp redhat.repo redhat-media.repo[root@zabbix yum.repos.d]# lltotal 12-rw-r--r--. 1 root root 358 Apr 27 14:15 redhat-media.repo-rw-r--r--. 1 root root 358 Apr 27 13:33 redhat.repo-rw-r--r--. 1 root root 529 Jun 12  2015 rhel-source.repo

2、编辑redhat-media.repo,编辑好后保存退出。

[root@zabbix yum.repos.d]# vi redhat-media.repo ## Certificate-Based Repositories# Managed by (rhsm) subscription-manager## *** This file is auto-generated.  Changes made here will be over-written. ***# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***## If this file is empty and this system is subscribed consider# a "yum repolist" to refresh available repos#[r67media]baseurl=file:///mediagpgcheck=0 enabled=1 ~

3、测试yum库安装状态

[root@zabbix yum.repos.d]# yum list | moreLoaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Repository 'r67media' is missing name in configuration, using idInstalled PackagesConsoleKit.x86_64                      0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ConsoleKit-libs.x86_64                 0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ConsoleKit-x11.x86_64                  0.4.1-3.el6                      @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7DeviceKit-power.x86_64                 014-3.el6                        @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ElectricFence.x86_64                   2.2.2-28.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7GConf2.x86_64                          2.28.0-6.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7GConf2-devel.x86_64                    2.28.0-6.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7GConf2-gtk.x86_64                      2.28.0-6.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7MAKEDEV.x86_64                         3.24-6.el6                       @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ModemManager.x86_64                    0.4.0-5.git20100628.el6          @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7NetworkManager.x86_64                  1:0.8.1-99.el6                   @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7NetworkManager-glib.x86_64             1:0.8.1-99.el6                   @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7NetworkManager-gnome.x86_64            1:0.8.1-99.el6                   @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ORBit2.x86_64                          2.14.17-5.el6                    @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7ORBit2-devel.x86_64                    2.14.17-5.el6                    @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7OpenEXR-libs.x86_64                    1.6.1-8.1.el6                    @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7OpenIPMI.x86_64                        2.0.16-14.el6                    @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7OpenIPMI-libs.x86_64                   2.0.16-14.el6                    @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit.x86_64                      0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-device-rebind.x86_64        0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-glib.x86_64                 0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-gstreamer-plugin.x86_64     0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-gtk-module.x86_64           0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-yum.x86_64                  0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PackageKit-yum-plugin.x86_64           0.5.8-25.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PyQt4.x86_64                           4.6.2-9.el6                      @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PyQt4-devel.x86_64                     4.6.2-9.el6                      @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7PyYAML.x86_64                          3.10-3.1.el6                     @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7Red_Hat_Enterprise_Linux-Release_Notes-6-en-US.noarch                                       7-2.el6                          @anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7

到此本地yum库安装成功。

转载于:https://my.oschina.net/u/154628/blog/888303

你可能感兴趣的文章
HTTP状态码详解
查看>>
Java_动态加载
查看>>
atitti.atiNav 手机导航组件的设计
查看>>
Ubuntu+Apache+PHP+Mysql环境搭建(完整版)
查看>>
Atitit.计算机图形图像图片处理原理与概论attilax总结
查看>>
于ssh端口转发的深入实例[转 - 当当 - 51CTO技术博客
查看>>
从Python安装到语法基础,这才是初学者都能懂的爬虫教程 ...
查看>>
超级AD远程管理软件
查看>>
Oracle数据库安全加固记录
查看>>
安全运维之:Linux系统账户和登录安全
查看>>
【cocos2d-x从c++到js】17:使用FireFox进行JS远程调试
查看>>
Kafka Offset Storage
查看>>
深度学习笔记之CNN(卷积神经网络)基础
查看>>
JAVA设计模式之【原型模式】
查看>>
Hadoop 添加删除数据节点(datanode)
查看>>
33.8. slb configuration
查看>>
ext的window如何隐藏水平滚动条
查看>>
71.8. Run level shell script to start Oracle 10g services on RedHat Enterprise Linux (RHAS 4)
查看>>
SAP QM Transfer of Inspection Stock
查看>>
全新视觉| 数治省市:SAP大数据构想一切可能
查看>>