Making A Mirror For Linux Mint 18

Love linux mint? got storage and bandwidth? you can help out by creating a mirror to host packages for others to download.

The following will be a guide to make a linux mint 18 repository server. It is not every baby step you need to take but if you are interested in becoming a repo server then I will assume you know your way around some things as we go along. If you have lots of space feel free to make one for all versions of mint. All my systems run mint 18 so I am running a repo server for just 18 (you can call me selfish and give me a 4TB drive if you like *grin*)

The steps are install the keyring so you can copy the files, sync up what is in the main repo servers to your server, have apache (or any other web server) share those files out.

First install debmirror, thats what we will use to sync up the ubuntu respoitories that mint uses

Now we install the keyring, just to keep it seperate from any users keyring I put mine in /home/mirrorkeyring. Replace that with whatever path you like to keep yours.

Now we sync up the linux mint packages repository. I have chosen /var/www/html/mint18_packages_repo, change that to whatever path yours will be stored in.

This can take some time as it is (as of the date of this how to) 25GB in size and growing every day. Also note that I have "--bwlimit=1000" in the command line to limit the downloading / syncing to 1MB/sec as you may not want this to use all your internet bandwidth, change to your likeing or if your not concerned about your internet pipeline take it out all together

Now we sync up the ubuntu repository. Note the "keyring" denotes the path to the keyring file we made earlier. Make sure it points to the correct path. We are also specifying we only want to sync X64 packages "-a amd64" and we are excluding the source packages "--no-source". We specify the version of ubuntu that linux mint 18 uses, "-d xenial,xenial-updates,xenial-backports" and like before we are using "--bwlimit=1000" to limit the bandwidth to not use up all the internet pipeline. Here the repo will be stored in /var/www/html/ubuntu_xenial. Make sure you speciify the path you want to use.

In this example we have placed the repo in the apache default folder, so hitting the server with a client and giving the paths /mint18_packages_repo and /ubuntu_xenial the client will be able to get the packages stored on the repo. What web server you use and how to configure it is beyound the scope of this quick howto.

The client will have to edit "/etc/apt/sources.list.d/official-package-repositories.list" and change the server listing for and (you may have slightly different servers in your list)

Once the client has the file changed a simple apt-get update should sync the client and your server together.

MOST IMPORTANTLY.....the packages change and they change frequently!!...To keep your server up to date you should run the above commands in a cronjob that should run at least once a day. You can go more than that but remember these are busy servers and every time you sync up it takes bandwidth away from others. So keep it to 3 times a day or less.