12 responses

  1. Etescartz
    May 7, 2014

    I think the repository wold be faster with nginx instead of apache2. Also there is no mention on how to add specific ‘.deb’ files to this repository.
    This can be used for software not directly stored on Canonical’s official repositories or just in some private package archives (PPA) found on https://launchpad.net

    I use this for latest libreoffice.org packages that take time to make their way into Ubuntu’s official repositories.

    You’ll need ‘dpkg-dev’ package:

    sudo apt-get install dpkg-dev

    Then you’ll need to create a folder that you’ll use to store the *.deb files
    sudo mkdir -p //debs/ for obvious path consistency reasons, but any folder path can be used.

    To update the *.deb files in the directory you created and make them visible through your repository, you’ll need to create a script :

    let’s say it will be located in /usr/bin/


    sudo nano /usr/bin/debupdate

    the script will contain the following lines:

    #! /bin/bash
    cd //debs/
    dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz

    Once created you’ll need to make it executable using chmod command.

    ex: sudo chmod +x /usr/bin/debupdate

    At this point all there’s left to do is run the script like so:

    ex: sudo debupdate

    Note. This script must be run after any change/update/addition of .deb files in the foder you created. This can be set up as a crobjob or just manually run the script once you added/removed .deb packages.

    • SK
      May 7, 2014

      Thanks for the suggestion. Much appreciated.

  2. Stockman
    May 8, 2014

    ho about using nginx instead of apache2 ?

    • Etescartz
      May 8, 2014

      Didn’t read the comments after reading the article. Did you ? :D

      • Stockman
        May 9, 2014

        oh sorry. didn’t read. but it would be nice to have an article about how to configure using nginx

      • Etescartz
        May 9, 2014

        it’s pretty much the same thing. I think I saw one for Debian on howtoforge.com . The configuration options, for nginx were pretty straight forward so I guess you can use them in Ubuntu as well.

  3. Robert Eddy
    May 11, 2014

    I’ve not used apt-cacher, but I’ve been pretty happy with apt-cacher-ng, which is a fork of Apt-Cacher, if I’m recalling correctly, though the name also suggests this.

    It works very much the same, from looking at this short tutorial.

  4. Rehankhan
    July 26, 2014

    how can i change this

    deb trusty main restricted

    deb trusty universe

    with this

    deb main restricted

    deb trusty universe

    please answer me i need your help

  5. Joe Gruher
    July 30, 2014

    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. Any idea what would cause that and how to fix it?

Leave a Reply




Back to top
mobile desktop