Creating a Repo Source Package
CentOS 7.6
- Run the reposync command to download all files of the EPEL Repo image source to the host in batches.
- Download the files of the epel.repo image repository.
1reposync -r epel -p /opt/EPEL
- Download the files of the CentOS-Base.repo image repository.
1reposync -r CentOS-Base -p /opt/CentOS-Base
- Download the files of the ceph.repo image repository.
1reposync -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.
- Download the files of the epel.repo image repository.
- 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 .
- 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
- 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
- Run the reposync command to download all files of the ceph.repo image source to the host in batches.
1reposync -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.
- The repodata file is generated in the /opt/ceph directory.
1 2 3
yum install -y createrepo cd /opt/ceph createrepo .
- Compress the /opt/ceph directory.
1zip -r ceph.zip /opt/ceph
- 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.
Parent topic: More Resources