zoukankan      html  css  js  c++  java
  • 为CentOS 加入�本地源

    首先把光盘中的Packages文件夹复制到本地。
    [arm@Jarvis Packages]$ pwd
    /home/Packages
    
    安装用于创建安装包依赖关系的软件createrepo
    [arm@Jarvis Packages]$ sudo rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm 
    [sudo] password for arm: 
    error: Failed dependencies:
    	python-deltarpm is needed by createrepo-0.9.9-17.el6.noarch
    [arm@Jarvis Packages]$ sudo rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm 
    error: Failed dependencies:
    	deltarpm = 3.5-0.5.20090913git.el6 is needed by python-deltarpm-3.5-0.5.20090913git.el6.i686
    [arm@Jarvis Packages]$ sudo rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm deltarpm-3.5-0.5.20090913git.el6.i686.rpm 
    Preparing...                ########################################### [100%]
       1:deltarpm               ########################################### [ 33%]
       2:python-deltarpm        ########################################### [ 67%]
       3:createrepo             ########################################### [100%]
    
    须要自己解决依赖关系。
    
    在软件包文件夹下执行createrepo ./  生成依赖文件夹。
    [arm@Jarvis Packages]$ ls repodata/
    0b7d3cfdca922b8a307902df84478e0732a24ca64c16f774325908f5749f02c3-filelists.xml.gz
    5243dcba9550a044ffbe7ca078d99cc34c2349e0bc4c7d952f49d37292f6d2c1-filelists.sqlite.bz2
    819bafef2fc5d465d58f71c5797c0314dce6e0dfd6ecefc6bbcb3485aceef405-primary.xml.gz
    81a635fe0768f1b70fa21e8d31c6ce7918f0083867b17dc921da859053bf4939-other.sqlite.bz2
    c2862b5223220d3333855f25109290e8afd736ef30e74b97a9405d4ecb2de11e-other.xml.gz
    e103aec1de8fa69cc9bc0367a53f71c4c6750cf9a9b94644da47ac29fe06790b-primary.sqlite.bz2
    repomd.xml
    
    
    假设要加入�分组信息,能够挂载一个光盘,使用里面的分组信息:
    [arm@Jarvis Packages]$ sudo createrepo -g /mnt/cdrom/repodata/*comps.xml ./
    
    /etc/yum.repos.d
    中删除全部配置文件(能够自行备份到其它地方去)
    新建一个名字随意,必须以repo结尾。
    编辑为:
    [Javris]
                      (名字 随意)
    name = welcome Jarvis
          (描写叙述 随意)
    baseurl = file:///home/Packages/
          (文件夹 自定)
    enabled = 1
                  (启用)
    gpgcheck = 0
            (不检查签名)
    
    保存推出后,执行 yum clean all
     清除曾经的缓存。
    yum list 检查是否成功。
    
    创建好之后,本机能够通过file方式直接使用,假设要作为对外的YUM仓库server,能够通过HTTPFTPNFS协议共享。
    
  • 相关阅读:
    DDD 领域驱动设计-谈谈 Repository、IUnitOfWork 和 IDbContext 的实践
    UVA10071 Back to High School Physics
    UVA10071 Back to High School Physics
    UVA10055 Hashmat the Brave Warrior
    UVA10055 Hashmat the Brave Warrior
    UVA458 The Decoder
    UVA458 The Decoder
    HDU2054 A == B ?
    HDU2054 A == B ?
    POJ3414 Pots
  • 原文地址:https://www.cnblogs.com/hrhguanli/p/3800544.html
Copyright © 2011-2022 走看看