准备工作

-----------------------------------------------------------------------------

1. 加载光驱

 将iso镜像文件放入光驱中

# mount /dev/cdrom /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only

  

2. 安装createrepo软件包

# cd /mnt/Packages/

 rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
rpm -ivh createrepo-0.9.-.el6.noarch.rpm
3. 从光驱cp软件包安装到系统
mkdir /app/myyum
cp -r /mnt/Packages/ /app/myyum/
 
配置yum
---------------------------------------------------
 
4. 生成依赖关系
 
 createrepo -g /mnt/repodata/cda5429be6f36ce1348e8f897f4fc96aa00d5727c75e9e5a0b5dc40d22a51116-comps-rhel6-Server.xml /app/myyum/Packages/

  

5. 编辑 yum 仓库配置文件
 
cd /etc/yum.repos.d/
cp rhel-source.repo rhel-source.repo.bak vi rhel-source.repo
[myyum]
name=Red Hat Yum
baseurl=file:///app/myyum/Packages/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

  

 
6. 测试配置是否正常

yum grouplist

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Group Process
myyum | 3.8 kB 00:00 ...
myyum/primary_db | 2.9 MB 00:00 ...
myyum/group_gz
至此,yum安装成功。
 
 
7. yum 安装软件
 
使用rpm 安装时,可以看到需要依赖书当然软件包
rpm -ivh openssl-devel-1.0.0-27.el6.x86_64.rpm
warning: openssl-devel-1.0.0-27.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
krb5-devel is needed by openssl-devel-1.0.0-27.el6.x86_64
 
使用 yum 安装

yum install openssl-devel-1.0.0-27.el6.x86_64.rpm -y

  

-y 表示在询问是否需要安装相关依赖包时,自动回应为 yes

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Examining openssl-devel-1.0.0-27.el6.x86_64.rpm: openssl-devel-1.0.0-27.el6.x86_64
Marking openssl-devel-1.0.0-27.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 0:1.0.0-27.el6 will be installed
--> Processing Dependency: krb5-devel for package: openssl-devel-1.0.0-27.el6.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.10.3-10.el6 will be installed
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.10.3-10.el6.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.10.3-10.el6.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.10.3-10.el6.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.4-4.el6 will be installed
---> Package libcom_err-devel.x86_64 0:1.41.12-14.el6 will be installed
---> Package libselinux-devel.x86_64 0:2.0.94-5.3.el6 will be installed
--> Processing Dependency: libsepol-devel >= 2.0.32-1 for package: libselinux-devel-2.0.94-5.3.el6.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.0.94-5.3.el6.x86_64
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.0.41-4.el6 will be installed
--> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================
Installing:
openssl-devel x86_64 1.0.0-27.el6 /openssl-devel-1.0.0-27.el6.x86_64 2.1 M
Installing for dependencies:
keyutils-libs-devel x86_64 1.4-4.el6 myyum 28 k
krb5-devel x86_64 1.10.3-10.el6 myyum 493 k
libcom_err-devel x86_64 1.41.12-14.el6 myyum 31 k
libselinux-devel x86_64 2.0.94-5.3.el6 myyum 136 k
libsepol-devel x86_64 2.0.41-4.el6 myyum 64 k Transaction Summary
===============================================================================================================================================
Install 6 Package(s) Total size: 2.8 M
Total download size: 753 k
Installed size: 4.7 M
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------------
Total 6.4 MB/s | 753 kB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
Userid : Red Hat, Inc. (release key 2) <security@redhat.com>
Package: redhat-release-server-6Server-6.4.0.4.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0x2FA658E0:
Userid : Red Hat, Inc. (auxiliary key) <security@redhat.com>
Package: redhat-release-server-6Server-6.4.0.4.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : libcom_err-devel-1.41.12-14.el6.x86_64 1/6
Installing : keyutils-libs-devel-1.4-4.el6.x86_64 2/6
Installing : libsepol-devel-2.0.41-4.el6.x86_64 3/6
Installing : libselinux-devel-2.0.94-5.3.el6.x86_64 4/6
Installing : krb5-devel-1.10.3-10.el6.x86_64 5/6
Installing : openssl-devel-1.0.0-27.el6.x86_64 6/6
Verifying : krb5-devel-1.10.3-10.el6.x86_64 1/6
Verifying : libsepol-devel-2.0.41-4.el6.x86_64 2/6
Verifying : keyutils-libs-devel-1.4-4.el6.x86_64 3/6
Verifying : openssl-devel-1.0.0-27.el6.x86_64 4/6
Verifying : libselinux-devel-2.0.94-5.3.el6.x86_64 5/6
Verifying : libcom_err-devel-1.41.12-14.el6.x86_64 6/6 Installed:
openssl-devel.x86_64 0:1.0.0-27.el6 Dependency Installed:
keyutils-libs-devel.x86_64 0:1.4-4.el6 krb5-devel.x86_64 0:1.10.3-10.el6 libcom_err-devel.x86_64 0:1.41.12-14.el6
libselinux-devel.x86_64 0:2.0.94-5.3.el6 libsepol-devel.x86_64 0:2.0.41-4.el6 Complete!

  

从上面的信息可以看到,yum自动安装了五个依赖包,如果使用 rpm 的话,就需要通过报错一个个地安装这五个文件。
 
 
 
 

redhat 6.4 yum 本地配置简记的更多相关文章

  1. RedHat和CentOS使用本地yum源配置

    2013-04-01 11:38:30 标签:本地yum源 版权声明:原创作品,谢绝转载!否则将追究法律责任. 使用yum命令安装所需的软件,如果设备网络状况很好,当然也没必要去配置本地yum源,直接 ...

  2. RedHat linux配置yum本地资源

    今天安装个linux平台的oracle数据库,在oracle检测的时候发现有些系统补丁包没有安装,手动rpm安装报有些关联包也没有安装,想想如果一个一个rpm的话累死人了要,所以想起用yum来进行安装 ...

  3. redhat 7 配置yum本地源

    http://www.unixarena.com/2015/04/how-to-create-the-yum-repository-on-rhel-7.html   1. 在虚拟机上挂上cd 2. m ...

  4. Oracle linux6.1配置yum本地源

    一.准备工作1. Linux安装盘插入光驱2. 挂载光驱 [root@localhost ~]# mount /dev/cdrom /mnt/ mount: block device /dev/sr0 ...

  5. centos 系统软件包管理 yum 本地yum配置 扩展源epel rpm 清除yum缓存 yum provides "*/vim" 第十节课

    centos  系统软件包管理  yum 本地yum配置  扩展源epel  rpm  清除yum缓存  yum provides "*/vim"   第十节课 你不能保证可逆化操 ...

  6. Centos6.4 本地yum源配置

    由于单位的服务器均使用的是内网,而安装一些软件如Git,需要很多的依赖包,使用yum安装相对简单,由于不能联网故配置本地yum源配置. 1.首先将需要rpm库添加到系统中: 1).虚拟机中安装的lin ...

  7. RHEL 7.0 本地配置yum源

    RHEL 7.0 本地配置yum源  yum简介  yum = Yellow dog Updater, Modified 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...

  8. Redhat系列使用ISO或者光盘制作yum本地安装源

    适用系统:redhat系列 示例系统:CentOS 6x86_64 环境:虚拟机   有时候做实验又不能联网的情况下想装一款软件时,经常会搞的头大:难道要去系统镜像中一个个拷出来再用rpm安装?各种依 ...

  9. RedHat yum源配置

    RedHat yum源配置 原本以为Redhat7 和Centos7是完全一样的,可是安装完Redhat7以后,使用yum安装软件,提示红帽操作系统未注册.在网上搜索教程,最后成功解决,解决方式是将y ...

随机推荐

  1. The Cow Lexicon

    The Cow Lexicon Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8815 Accepted: 4162 Descr ...

  2. 对于数据包的截取,使用linux中的netfilter钩子函数

    http://blog.csdn.net/wswifth/article/details/5115358 在师哥的代码(packet.c)中使用的是Linux2.4内核中的一个子系统:netfilte ...

  3. hdu 3037 Saving Beans

    Saving Beans Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota ...

  4. java中的构造函数

    在c++中就学习了构造函数,今天学习java又碰到了构造函数,重新写一篇博客来理解一下 其实直接听这个词并不能理解这是什么,但其实看了它的作用,就很好理解了 当创建一个对象时,往往需要做一些初始化工作 ...

  5. loadrunner安装汉化破解

    1.解压loadrunner11,点击setup.exe安装loadrunner11. 遇到问题,"...输入命令\来解决". 解决办法:运行解压包的loadrunner-11安装 ...

  6. 转载 WebBrowser介绍——Javascript与C++互操作

    注:本文来自于 http://www.cnblogs.com/lucc/archive/2010/11/24/1886087.html WebBrowser控件是Microsoft提供的一个用于网页浏 ...

  7. Python3基础 逻辑与 and

    镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...

  8. linux内核中的GPIO系统之(1):软件框架

    一.前言 作为一个工作多年的系统工程师,免不了做两件事情:培训新员工和给新员工分配任务.对于那些刚刚从学校出来的学生,一般在开始的时候总是分配一些非常简单的任务,例如GPIO driver.LED d ...

  9. .Net操作.exe文件

    Process proc = new Process(); proc.StartInfo.FileName = @"D:\Program Files\Foxmail\Foxmail.exe& ...

  10. Android Studio中有用的快捷键栏

    Android Studio中有用的快捷键栏#1 Ahraewi线移动 Alt + Shift +向上/向下❖Alt + Shift +向上/向下 或上下移动在所选位置的行. 删除行 CMD + B ...