redhat实现光盘yum

简介:

实验环境

redhat 6.5-x64

 

实验软件

createrepo-0.9.9-18.el6.noarch.rpm

python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

vsftpd-2.2.2-11.el6_4.1.x86_64.rpm

 

软件安装

rpm -ivh createrepo-0.9.9-18.el6.noarch.rpm

rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

rpm -ivh vsftpd-2.2.2-11.el6_4.1.x86_64.rpm

 

 

mount /dev/cdrom  /mnt/  挂载光盘镜像,也可以使用mount-o loop为镜像挂载
mkdir -p /var/ftp/pub

cp  -rv /mnt/Packages/* /var/ftp/pub/

cp  -rv /mnt/repodata/* /var/ftp/pub/


cd /var/ftp/pub/repodata/

cp -p 6221039e7e3dabf7d538c76571d82aaf42b6292b8f6fe6cf56b8fcf1cff3d3ab-comps-rhel6-Server.xml ~

cd ..

rm -rf repodata


createrepo -g  ./6221039e7e3dabf7d538c76571d82aaf42b6292b8f6fe6cf56b8fcf1cff3d3ab-comps-rhel6-Server.xml .

cd /etc/yum.repos.d/

cp -p rhel-source.repo rhel.repo


vim rhel.repo

[rhel]

name=Red Hat Enterprise Linux $releasever -$basearch - Source

baseurl=file:///var/ftp/pub

enabled=1

gpgcheck=0

 

yum clean all  清除yum头部数据

Loaded plugins: product-id,refresh-packagekit, security, subscription-manager

This system is not registered to Red HatSubscription Management. You can use subscription-manager to register.

Cleaning repos: rhel

Cleaning up Everything

 

yum list 列出安装的文件

yum makecache -y yum缓存到本地

 

[root@localhost ~]# yum install -y httpd*

Loaded plugins: product-id,refresh-packagekit, security, subscription-manager

This system is not registered to Red HatSubscription Management. You can use subscription-manager to register.

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package httpd.x86_640:2.2.15-29.el6_4 will be installed

--> Processing Dependency: apr-util-ldapfor package: httpd-2.2.15-29.el6_4.x86_64

--> Processing Dependency:libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-29.el6_4.x86_64

--> Processing Dependency:libapr-1.so.0()(64bit) for package: httpd-2.2.15-29.el6_4.x86_64

---> Package httpd-devel.x86_640:2.2.15-29.el6_4 will be installed

--> Processing Dependency:apr-util-devel for package: httpd-devel-2.2.15-29.el6_4.x86_64

--> Processing Dependency: apr-devel forpackage: httpd-devel-2.2.15-29.el6_4.x86_64

---> Package httpd-manual.noarch0:2.2.15-29.el6_4 will be installed

---> Package httpd-tools.x86_640:2.2.15-29.el6_4 will be installed

--> Running transaction check

---> Package apr.x86_64 0:1.3.9-5.el6_2will be installed

---> Package apr-devel.x86_640:1.3.9-5.el6_2 will be installed

---> Package apr-util.x86_640:1.3.9-3.el6_0.1 will be installed

---> Package apr-util-devel.x86_640:1.3.9-3.el6_0.1 will be installed

--> Processing Dependency:openldap-devel for package: apr-util-devel-1.3.9-3.el6_0.1.x86_64

--> Processing Dependency: expat-develfor package: apr-util-devel-1.3.9-3.el6_0.1.x86_64

---> Package apr-util-ldap.x86_640:1.3.9-3.el6_0.1 will be installed

--> Running transaction check

---> Package expat-devel.x86_640:2.0.1-11.el6_2 will be installed

---> Package openldap-devel.x86_640:2.4.23-32.el6_4.1 will be installed

--> Processing Dependency:cyrus-sasl-devel >= 2.1 for package: openldap-devel-2.4.23-32.el6_4.1.x86_64

--> Running transaction check

---> Package cyrus-sasl-devel.x86_640:2.1.23-13.el6_3.1 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

===============================================================================================

 Package                    Arch             Version                      Repository      Size

===============================================================================================

Installing:

 httpd                      x86_64           2.2.15-29.el6_4              rhel           821 k

 httpd-devel                x86_64           2.2.15-29.el6_4              rhel           150 k

 httpd-manual               noarch           2.2.15-29.el6_4              rhel           783 k

 httpd-tools                x86_64           2.2.15-29.el6_4              rhel            73 k

Installing for dependencies:

 apr                        x86_64           1.3.9-5.el6_2                rhel           123 k

 apr-devel                  x86_64           1.3.9-5.el6_2                rhel           176 k

 apr-util                   x86_64           1.3.9-3.el6_0.1              rhel            87 k

 apr-util-devel             x86_64           1.3.9-3.el6_0.1              rhel            69 k

 apr-util-ldap              x86_64           1.3.9-3.el6_0.1              rhel            15 k

 cyrus-sasl-devel           x86_64           2.1.23-13.el6_3.1            rhel           302 k

 expat-devel                x86_64           2.0.1-11.el6_2               rhel           120 k

 openldap-devel             x86_64           2.4.23-32.el6_4.1            rhel           1.1 M

 

Transaction Summary

===============================================================================================

Install     12 Package(s)

 

Total download size: 3.7 M

Installed size: 15 M

Downloading Packages:

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

Total                                                          35 MB/s | 3.7 MB     00:00    

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

 Installing : apr-1.3.9-5.el6_2.x86_64                                                  1/12

 Installing : apr-util-1.3.9-3.el6_0.1.x86_64                                           2/12

 Installing : apr-devel-1.3.9-5.el6_2.x86_64                                            3/12

 Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                                       4/12

 Installing : httpd-tools-2.2.15-29.el6_4.x86_64                                         5/12

 Installing : httpd-2.2.15-29.el6_4.x86_64                                              6/12

 Installing : expat-devel-2.0.1-11.el6_2.x86_64                                          7/12

 Installing : cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64                                  8/12

 Installing : openldap-devel-2.4.23-32.el6_4.1.x86_64                                    9/12

 Installing : apr-util-devel-1.3.9-3.el6_0.1.x86_64                                     10/12

 Installing : httpd-devel-2.2.15-29.el6_4.x86_64                                        11/12

 Installing : httpd-manual-2.2.15-29.el6_4.noarch                                       12/12

 Verifying  :apr-devel-1.3.9-5.el6_2.x86_64                                            1/12

 Verifying  :cyrus-sasl-devel-2.1.23-13.el6_3.1.x86_64                                  2/12

 Verifying  : httpd-manual-2.2.15-29.el6_4.noarch                                        3/12

 Verifying  :httpd-2.2.15-29.el6_4.x86_64                                              4/12

 Verifying  :apr-util-ldap-1.3.9-3.el6_0.1.x86_64                                       5/12

 Verifying  :apr-1.3.9-5.el6_2.x86_64                                                  6/12

 Verifying  :apr-util-devel-1.3.9-3.el6_0.1.x86_64                                      7/12

 Verifying  :expat-devel-2.0.1-11.el6_2.x86_64                                         8/12

 Verifying  :httpd-devel-2.2.15-29.el6_4.x86_64                                         9/12

 Verifying  :openldap-devel-2.4.23-32.el6_4.1.x86_64                                   10/12

 Verifying  : httpd-tools-2.2.15-29.el6_4.x86_64                                        11/12

 Verifying  :apr-util-1.3.9-3.el6_0.1.x86_64                                          12/12

 

Installed:

 httpd.x86_64 0:2.2.15-29.el6_4                 httpd-devel.x86_640:2.2.15-29.el6_4        

 httpd-manual.noarch 0:2.2.15-29.el6_4          httpd-tools.x86_640:2.2.15-29.el6_4        

 

Dependency Installed:

 apr.x86_64 0:1.3.9-5.el6_2                  apr-devel.x86_640:1.3.9-5.el6_2               

 apr-util.x86_64 0:1.3.9-3.el6_0.1           apr-util-devel.x86_640:1.3.9-3.el6_0.1        

 apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1      cyrus-sasl-devel.x86_640:2.1.23-13.el6_3.1    

 expat-devel.x86_64 0:2.0.1-11.el6_2         openldap-devel.x86_640:2.4.23-32.el6_4.1      



本文转自 mailfile 51CTO博客,原文链接:http://blog.51cto.com/mailfile/1557976,如需转载请自行联系原作者

相关文章
|
Linux
Centos/Redhat 本地yum源配置(Linux)
Centos/Redhat 本地yum源配置(Linux)
386 0
Centos/Redhat 本地yum源配置(Linux)
|
缓存 开发工具
RedHat8.4配置本地yum软件仓库(RHEL8.4)
RedHat8.4配置本地yum软件仓库(RHEL8.4)
1858 0
RedHat8.4配置本地yum软件仓库(RHEL8.4)
|
关系型数据库 MySQL Linux
RedHat7.4 Yum环境下搭建LAMP实现库站分离(部署wordpress博客)
RedHat7.4 Yum环境下搭建LAMP实现库站分离(部署wordpress博客)
224 0
RedHat7.4 Yum环境下搭建LAMP实现库站分离(部署wordpress博客)
|
存储 缓存 Linux
Linux RedHat7.4更换阿里云yum源(RHEL7.4)
Linux RedHat7.4更换阿里云yum源(RHEL7.4)
4250 0
|
缓存 Linux 开发工具
RedHat7.4配置yum软件仓库(RHEL7.4)
RedHat7.4配置yum软件仓库(RHEL7.4)
834 0
RedHat7.4配置yum软件仓库(RHEL7.4)
|
缓存 Linux Shell
|
Linux 开发工具
Redhat7.x 修改阿里云yum源
redhat系统中,如果你想要更新yum仓库,它会提示让你注册才能更新,因为centos和redhat基本相同,所以我把yum这一套全换成centos的。
5676 1
|
Linux 缓存
Minimal安装CentOS 7使用yum报This system is not registered to Red Hat Subscription Management.
问题描述 最小化安装CentOS 7的Linux系统后,发现yum安装任何工具,都报This system is not registered to Red Hat Subscription Management. 错误如下所示: 导致很多工具都无法yum进行安装,影响系统使用。
1658 0
|
Linux
配置yum软件仓库(redhat 7.0)
第一步:切换到yum配置文件目录 执行:cd /etc/yum.repos.d/ 第二步:创建文件并进行编辑:vi rhel7.repo 写入如下内容:[rhel7] name=rhel7 ##名字随便命名 baseurl=file:///media/cdrom enabled=1 gpgch...
1544 0
|
Linux 缓存 开发工具
Redhat6 使用 yum源
由于Redhat的yum在线更新是收费的,如果没有注册的话是不能使用的,即不能在线安装软件。
2465 0