APT
repository mirrors are easy to configure.
Here we will create a repository for the default Debian repository located at
http://deb.debian.org/debian
Create blob store
You only need to do this once per group of repositories.
So for Debian then create a blob store called debian
,
for Ubuntu then create ubuntu
etc.
Then for each mirror you create then reuse the same blob store for each group.
- Log in to Nexus and go to the admin page via the icon in the top nav bar.
- Select blob store, then Create blob store
- Under Type select File
-
Under Name enter
debian
- Select Create blob store to create it.
Create mirror
- Log in to Nexus and go to the admin page via the icon in the top nav bar.
- Select Repositories then the Create Repository
-
Select
apt (proxy)
as the repository type. -
Now fill in the required fields.
Here we will use Debian as an example:
-
For name enter
apt-debian
-
For Distribution
buster
- note this isn't as important as you might think but it is required -
For Remote storage enter the repository url
http://deb.debian.org/debian
-
For Blob store select the one you created earlier,
debian
if you are following my naming conventions.
-
For name enter
- Once it's all filled in select Save and the Repositories list should now show it.
Common repositories to mirror
The following table lists the repositories mirror covering Debian
, Ubuntu
and
Raspberry PI OS
:
Distribution | Name | Remote storage | Blob store | Distribution |
---|---|---|---|---|
Debian | apt-debian | http://deb.debian.org/debian | debian | buster |
apt-debian-security | http://security.debian.org/debian-security | |||
Raspian / Raspberry PI OS |
apt-raspbian | http://raspbian.raspberrypi.org/raspbian/ | raspbian | buster |
apt-raspbian-archive | http://archive.raspberrypi.org/debian/ | |||
Ubuntu | apt-ubuntu-archive | http://gb.archive.ubuntu.com/ubuntu | ubuntu | focal |
apt-ubuntu-ports | http://ports.ubuntu.com/ubuntu-ports |
apt-ubuntu-archive
proxy goes to gb.archive.ubuntu.com
as I'm in the UK.
If you are using a different endpoint due to being elsewhere in the world you should be using the same one
instead of the GB one.
Using the mirror
Once you have configured your repositories, you can then proceed to configure your machines to use them. This is described in the Using Repository mirrors section.