How to configure a repository mirror for APT
Configure Repository mirror
Now we have a working installation it's time to set up mirrors for package repositories.
Although you can call the repositories anything you want, it's advisable to keep to a naming convention. The number of repositories will grow over time, and it will become obvious later which repository is for which package manager.
Because of this I advise the following:
Keep repository names lower case and use
-as a word separator. Never use a space.
The first word in a repository name should be the type,
aptfor an apt repository,
npmfor a node/npm repository etc.
The second word in a repository name should be the distribution.
apt-ubuntufor Ubuntu or
apt-raspbianfor Raspberry PI OS.
Any subsequent words in the name would be for specific repository names.
apt-debian-securityfor the Debian security repository.
Keeping to this scheme will make it easier to maintain as well as keeping like repositories next to each other within the Nexus UI.
Each repository mirror requires an object store to store the cached artefacts. It's advisable to create a new object store for each type of repository.
So for any mirror whose name starts with
apt-debian then create a keystore called
debian and use it as the backing store for all of them.
Do the same for Ubuntu, Raspberry PI OS etc.
If you are mirroring third party repositories like NVidia or OBS then you can either create an object store
for each or create one called
thirdparty and use that for those smaller repositories.
The naming is up to you, but it can help in keeping artefacts separate & not have individual large stores.
Configuring a repository mirror
The following subsections list how to configure each repository type: