Setting up an openEuler internal mirror — from an ISO directory-service minimal scheme to a full reposync mirror (server + client verified in testing)
Verification scope
Section titled “Verification scope”This page’s evidence is the bare-metal track (E3) — a both-sides verification of server (PVE host, isolated network 192.168.2.2) + client (VM 381 euler24-lab, openEuler 24.03 LTS SP4) (2026-11-05; the scheme keeps running in the euler lab environment, with two VMs sharing one ISO): ISO verification and mounting, HTTP service, and the full client chain of repo config / metadata / install. Raw log: evidence/logs/openeuler-p3-local-mirror-vm.log (server commands and client output included).
Option 1 (minimal): ISO directory service — an internal source in one command
Section titled “Option 1 (minimal): ISO directory service — an internal source in one command”The most common real need in an isolated network is “one machine has the ISO, N machines need to install packages”. No full mirror needed — serve the ISO as a directory tree:
# server (any Linux):mount -o loop,ro openEuler-24.03-LTS-SP4-x86_64-dvd.iso /mnt/euler-dvd # read-only mountpython3 -m http.server 8888 --bind <internal IP> -d /mnt/euler-dvd # one command# verify the ISO's sha256 first (compared character for character against the official sha256sum; this lab machine 8383d7e9…c4d0f5)Client repo (the form verified on this page):
[dvd-os]name=openEuler 24.03 LTS SP4 - DVD local mirrorbaseurl=http://192.168.2.2:8888/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-openEuler # key via local file, avoiding network TOFUClient chain verified in testing (2026-11-05):
$ dnf makecacheopenEuler 24.03 LTS SP4 - DVD local mirror 105 MB/s | 2.8 MB ← metadata pulled from the internal sourceMetadata cache created.$ dnf -y install rsync rsync x86_64 3.2.7-11.oe2403sp4 dvd-os 309 k ← repo column shows the dvd-os origin$ rpm -q rsync → rsync-3.2.7-11.oe2403sp4.x86_64 ✓Key points: http.server only suits small-scale/temporary use (single-threaded, no access control); replace with nginx (autoindex on) or Caddy in production, leaving the directory tree unchanged. GPG key pre-staging: copy /etc/pki/rpm-gpg/RPM-GPG-KEY-openEuler out of the ISO’s RPM-GPG-KEY-openEuler and pre-stage it in provisioning templates (the %post on the Kickstart page can do it too) — so the internal source’s signature verification is fully offline.
Option 2 (full): mirror-tree direct copy or reposync
Section titled “Option 2 (full): mirror-tree direct copy or reposync”When you need the update repo’s continuous updates (an ISO is a snapshot at release time and has no update):
- Mirror-tree direct copy (recommended): the official mirror site’s directory structure is the repo (under
openEuler-24.03-LTS-SP4/:OS/$basearch,EPOL/main/$basearch,everything/$basearch,update/$basearch, plus auxiliary repos such as debuginfo/source — EPOL is amain/sublayer, not a direct<arch>/), sorsync -av --deleteagainstrepo.openeuler.orgor the Huawei Cloud/Tsinghua mirrors, syncing the corresponding subtrees, is enough — main-repo paths match the official ones (auxiliary repos are configured separately per the repo files’ baseurl), and clients just assemble paths into baseurl; - dnf reposync: after installing
dnf-plugins-core(not preinstalled on the openEuler base image, see the package name map), rundnf reposync --repoid=OS --download-metadatato flatten per repo — suits mirroring only some repos, or filtering packages before mirroring.
Disk planning: OS+update (x86_64) is on the order of a few GB to a dozen-odd GB, and everything is substantially larger (the full package set) — pick the repo combination on demand, don’t blindly sync everything.
An external cross-check before fixing the sync list: pkgseek aggregates repository indexes for openEuler alongside openAnolis, OpenCloudOS, openKylin and more — search a package name to see whether it exists in each distro’s tree and in what version form. Checking before you finalize the --repoid combination saves rework from packages discovered missing after the mirror is already up.
Discipline checklist
Section titled “Discipline checklist”- Upstream verification: after syncing, compare repodata hashes against upstream (or periodically spot-check packages with
rpm -K); - The —delete window: rsync
--deletefollows upstream cleanup of old packages — if the internal network needs version locking (versionlock), pause —delete first or use a snapshot directory; - Multiple versions side by side: sync the LTS line’s SP directories (
openEuler-24.03-LTS-SP4/…) into per-version directories; when clients upgrade across SPs (SP upgrade), keep both trees side by side through the transition; - The boundary beyond HTTP: keep
gpgcheck=1even on internal sources — internal ≠ no signature verification (a common illusion in supply chain incidents).
Unverified
Section titled “Unverified”- An end-to-end full reposync was not executed in this experiment (the isolated-network VM has no external network; option 2 is configuration surface + official directory-structure facts; timing/disk measurements of a full sync are scheduled for a later batch);
- Production nginx/autoindex replacing http.server was not elaborated (generic web-server configuration, not an openEuler difference);
- Mirror bandwidth and concurrency performance were not measured (the minimal scheme’s 105 MB/s internal throughput already covers the lab scale).