Reposync is a new feature added to TDNF package manager version 3.1.0. Since the default version of TDNF installed on Photon OS 3.0 is 2.0.0, you must upgrade the system so that the latest version of TDNF is installed.
Ensure that you upgrade the TDNF version to 3.1.0. For information about upgrading the TDNF version, see Preparing Your System.
- Install the required packages.
#tdnf install createrepo nginx
- Use the
reposynccommand to synchronize the repositories of photon-updates and Photon from https://packages.vmware.com. Run the following commands:To synchronize from photon-updates repository:
#tdnf reposync --download-metadata --disablerepo=* --enablerepo=photon-updates --delete --download-path /photon-reps/updatesTo synchronize from photon repository:
#tdnf reposync --download-metadata --disablerepo=* --enablerepo=photon --delete --download-path /photon-reps/releaseNote: The size of photon-updates repository is about 46 GB. The size of photon repository is about 3.7 GB. It takes two to three hours to synchronize both repositories, and the duration depends on your network bandwidth and latency.
repodataif there are updates to any packages in the repository:
#createrepo -po /photon-reps/updates/photon-updates /photon-reps/updates/photon-updates/ #createrepo -po /photon-reps/release/photon /photon-reps/release/photon/
- Switch the ownership of the Photon repository folders after the image synchronizes.
For security reasons, do not use the Privileged User role for web services.
#chown -R nobody:nogroup /photon-reps