zoukankan      html  css  js  c++  java
  • yum 源本地化 (one)

    First of all, you need to prepare the rpm packages, we can download them with yum command, in that way, the dependencies needed by the rpm will also be downloaded.

    For example, you are trying to download memcached rpm

    yum install --downloadonly --downloaddir=/tmp/atomicdownload memcached

    The above command will download the corresponding rpm packages into /tmp/atomicdownload directory.

    The second step is to create the repo.

    [root@localhost atomicdownload]# createrepo -p -d -o /tmp/atomicdownload /tmp/atomicdownload
    Spawning worker 0 with 1 pkgs
    Spawning worker 1 with 0 pkgs
    Workers Finished
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata
    Generating sqlite DBs
    Sqlite DBs complete

    -p means pretty output

    -d means database

    -o means output

    The last step is to edit the repo file.

    vi /etc/yum.repos.d/CentOS-Base.repo

    The file content is like below:

    [base]
    name=da_repo
    baseurl=file:///opt/da/da_yum_repo
    enabled=1
    gpgcheck=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    The important configuration is

    baseurl  which is the url pointing to the repository

    enabled=1 will set this repository active

    gpgcheck=0 disable the check

    problem

    When I try to download from DVD Repo. The downloading always failed. Dont know why

  • 相关阅读:
    java方法参数传值传引用的一点看法
    Oracle触发器介绍
    CASE WHEN
    group by ,order by ,having
    Java中使用正则表达式
    Oracle 9i 分析函数参考手册
    ORACLE round 与 trunc 的区别
    oracle的默认表名长度(30)
    order by 使用索引的情况
    解析oracle的ROWNUM 作者: chen_liang
  • 原文地址:https://www.cnblogs.com/kramer/p/4278374.html
Copyright © 2011-2022 走看看