Setup Local Repositories with ‘apt-mirror’ in Ubuntu and Debian Systems

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

13 Responses

  1. Ravindra Maghudiya says:

    hi Matei Cezar, thanks a lot this great tutorial, i am all done with this process and now my network repository running very well.
    but i want too add some extra package other then default mint and ubuntu repository like google chrome,wpa office, in short i want the repository in that i can add my own deb or tar package and install it in my network. waiting for your great response, thanks in advance.

    • Matei Cezar says:

      I do not recommend adding thirty-party software in apt-mirror list, especially non-free software. Add only repos maintained by the distribution. As far as a know Kingsoft Office doesn’t provide any ppa for Ubuntu, only deb packages. Try to download the latest deb packages for the applications you need and place them in a new directory on the ftp server (/srv/ftp/my_deb for example).

  2. Luc Filiatrault says:

    I have 2 Debian client and one Debian server (back-up server). The later took less than 20 minutes to pass from Wheezy to Jessie .
    Do you think I would save bandwith if I build a repository basically for the 2 clients,considering when I move from one version to the next I will have to download all the new version packages again.


    • Ravi Saive says:

      If you setup a local repository in one of your sever for 2 clients, it will save bandwidth as it downloads and install packages from your local repository..

      In short, your local repository server will first download all packages in your server and then clients will fetch packages from your repository server, this way you can save bandwidth and time..

  3. hatta says:

    thank you for the information, I’ve tried to configure the server and succeed. but when I try to access via ftp client, it appears username and password. my question is how to fix it ?

    • Vimal says:

      restart proftpd service. it should work now

      • sneha says:

        For me also same issue now when I restarted the service I am getting site cant be reached,Please help how to solve this?

        • Matei Cezar says:

          Check if the ftp service is up and running and the corresponding ports are opened in firewall.

          • sneha says:

            Thanks for replying, now when I restarted the ftp service, service is up but now my ftp://public ip is not loading.Please let me know in aws which ports I need to open.I opened port 20 and 21. But no result.

          • Matei Cezar says:

            You should open ftp passive incoming ports. Consult ftp conf file fo the passive port range you need to open on aws for your ftp server (ports should be mentined there) or just open all incoming range from 1024 to 65534. Also, check ftp://localhost to test if is working or use a ssh tunnel for ftp service.

          • Matei Cezar says:

            20,21 Incoming ports opened, 1024-65534 (or just ftp range) for outgoing.

  4. Joe says:

    I ran apt-mirror and it downloaded a ton of stuff, so far so good, but it only created the ubuntu/pool directory, I don’t have necessary directories such as ubuntu/dists, and this causes the client to fail apt-get update. Any idea what would cause that and how to fix it?

  5. Etescartz says:

    Thanks for the great reading material!
    I haven’t had the chance to test your setup in production but I do have one set up with nginx as a web server repository. It used by just about 1000 clients and it is really fast.
    The hardware has more of a 2003-2004 feeling about it but it does the job flawlessly.

Leave a Reply to Joe Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.