我要评分
获取效率
正确性
完整性
易理解

Creating a Repo Source Package

CentOS 7.6

  1. Run the reposync command to download all files of the EPEL Repo image source to the host in batches.
    1. Download the files of the epel.repo image repository.
      1
      reposync -r epel -p /opt/EPEL
      
    2. Download the files of the CentOS-Base.repo image repository.
      1
      reposync -r CentOS-Base -p /opt/CentOS-Base
      
    3. Download the files of the ceph.repo image repository.
      1
      reposync -r ceph -p /opt/ceph
      

    In the preceding commands, /opt/epel, /opt/CentOS-Base, and /opt/ceph are the download destination directories. If no path is specified, the files are saved in the current directory.

  2. Generate the repodata file in the /opt/EPEL, /opt/CentOS-Base, and /opt/ceph directories.
    1
    2
    3
    4
    5
    6
    7
    yum install createrepo
    cd /opt/EPEL
    createrepo .
    cd /opt/CentOS-Base
    createrepo .
    cd /opt/ceph
    createrepo .
    
  3. Compress the /opt/EPEL, /opt/CentOS-Base, and /opt/ceph directories into .zip files.
    1
    2
    3
    zip -r EPEL.zip /opt/EPEL
    zip -r CentOS-Base.zip /opt/CentOS-Base
    zip -r ceph.zip /opt/ceph
    
  4. Save the source image files (EPEL.zip, CentOS-Base.zip, and ceph.zip) to the local host by using a CD/DVD or mobile storage medium to set up a local image repository.

openEuler 20.03

  1. Run the reposync command to download all files of the ceph.repo image source to the host in batches.
    1
    reposync -r ceph -p /opt/ceph
    

    In the preceding command, /opt/ceph is the download destination directory. If no path is specified, the file is saved in the current directory.

  2. The repodata file is generated in the /opt/ceph directory.
    1
    2
    3
    yum  install -y createrepo
    cd /opt/ceph
    createrepo  .
    
  3. Compress the /opt/ceph directory.
    1
    zip -r ceph.zip  /opt/ceph
    
  4. Save the mirror source files (ceph.zip) to the local host by using a CD/DVD or mobile storage medium to set up a local image repository.