Mirroring
YUM repository mirroring
These directions will walk you through using the open source tool reposync to mirror your YUM repository.
- Ensure you've installed this repository on your system.
reposync
will use the YUM configuration in /etc/yum.repos.d/ for mirroring. - Install
reposync
andcreaterepo
:sudo yum install yum-utils createrepo
NOTE:reposync
on CentOS 5 is buggy. We strongly encourage users to consider upgrading theirreposync
to a newer version. - Create a directory for storing your repository data:
mkdir -p /path/to/repository
- Run
reposync
specifying the the repository ID and the output directory.reposync --repoid=miry_geoipupdate -p /path/to/repository
- Finally, you should use createrepo to regenerate the repository metadata:
createrepo -o /path/to/repository /path/to/repository
- Your YUM repository mirror is ready to use.
Questions? We're here to help! Email support@packagecloud.io
APT repository mirroring
These directions will walk you through using the open source tool apt-mirror to mirror your APT repository.
- Install
apt-mirror
:sudo apt-get install apt-mirror
NOTE: If you are running Debian Wheezy or earlier, you must upgrade to a recent version (0.4.9 or newer) of apt-mirror for HTTPS support. - Create a directory for your mirror:
mkdir /path/to/repo-mirror
- Determine which version of Ubuntu or Debian you'd like to mirror. You'll need to add this to your apt-mirror config in the next step.
- Modify the apt-mirror config, using your favorite editor:
sudo nano /etc/apt/mirror.list
The default/etc/apt/mirror.list
configuration is split into two sections. The top section includes global configuration values. Set base_path to the directory you created above:set base_path /path/to/repo-mirror set nthreads 5 set _tilde 0
The bottom section of/etc/apt/mirror.list
contains a list of repositories to mirror. Use the example below, taking care to replace ubuntu and trusty with your Linux distribution and version:deb https://packagecloud.io/miry/geoipupdate/ubuntu/ trusty main deb-src https://packagecloud.io/miry/geoipupdate/ubuntu/ trusty main
- Import the GPG key for this repository by following the instructions on the GPG panel.
- Run apt-mirror to generate the mirror.
sudo apt-mirror
- Your APT repository mirror is ready to use.
Questions? We're here to help! Email support@packagecloud.io