设为首页 收藏本站
查看: 460|回复: 0

[经验分享] redhat实现光盘yum

[复制链接]
累计签到:2 天
连续签到:1 天
发表于 2018-5-11 08:23:14 | 显示全部楼层 |阅读模式
  实验环境
  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

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-458392-1-1.html 上篇帖子: RedHat/CentOS源码编译安装MySQL5.6.12 下篇帖子: Redhat 释放cached 内存
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表