This page provides some tips to set up a local mirror for our packages. Found a better method? We love to hear!
Using Sonatype Nexus Repository Manager
Step 1. Run Nexus in a Docker container
/usr/bin/docker run --net bridge -m 0b -p 8081:8081 -v /persistance_data/nexus:/sonatype-work --name nexus sonatype/nexus
Step 2. Configuration
Connect to the Docker host server using container port 8081 port and perform basic configuration: http://docker_host_server_fqdn:8081/nexus/
More information for Nexus: https://help.sonatype.com/display/NXRM2/Configuration
Step 3. Create a nexus proxy repository
From Nexus dashboard, Select repositories -> Add -> Proxy Repositories
Finally configure thhe proxy repository: repository name and Remote Storage location (e.g. upstream location: https://packages.cisofy.com/community/lynis/rpm/)
Step 4. Point to local repository
When the repository is configured, it is time to configure all the client systems. Point them to the local repository.
Thanks to Victor Ionel Varza from IBM for contributing information about NexusPulp
The Pulp project can be used for setting up a complete software repository.
Pulp is a platform for managing repositories of software packages and making it available to a large numbers of consumers. Pulp can locally mirror all or part of a repository, host your own software packages in repositories, and manage many types of content from multiple sources in one place.
APT and DPKG
Using apt
Configure the related external repository. Then use apt-get with the download command to retrieve a package. Store the package in a local directory or repository.
apt-get download lynis
apt-mirror
This tool helps to create a mirror of a Debian/Ubuntu repository or parts of it.
YUM and RPM
yum download
Install the plugin for yum (yum-downloadonly or yum-plugin-downloadonly on newer systems)
yum install --downloadonly --downloaddir=/root/my-directory package-name
reposync
This tool allows synchronization of a repository. This can be useful to pull in packages and place them on a local system, while keeping the packages up-to-date.
reposync --repoid=cisofy-lynis --download_path=/root/my-directory