Results 1 to 6 of 6
  1. #1
    Newbie
    Join Date
    May 2008
    Location
    Central United States
    Posts
    14

    Default Install and configure apt-cacher on Untangle UTM

    Is good if you have multiple systems that use deb packages (apt-get, aptitude, synaptic,...) to accelerate new builds and updates.
    After enabling the appropriate Debian repositories:
    As of this posting you will have to add the current Debian Lenny repositories to the file /etc/apt/sources.list since they have been moved.

    Install apt-cacher:

    apt-get update

    apt-get install apt-cacher

    In Configuration - Networking - Packet Filter add Packet Filter rules for the interfaces you want apt-cacher to serve

    apt-cacher and apt-cacher-ng Internal PASS Port 3142

    apt-cacher and apt-cacher-ng DMZ PASS Port 3142

    Review settings in /etc/apt-cacher/apt-cacher.conf

    nano /etc/apt-cacher/apt-cacher.conf

    Enable autostart of the apt-cacher daemon

    nano /etc/default/apt-cacher

    Change AUTOSTART=0 to AUTOSTART=1

    Restart Apache:

    /etc/init.d/apache2 restart

    Start apt-cacher:

    /etc/init.d/apt-cacher start
    Starting Apt-Cacher: apt-cacher Warning: /var/log/apt-cacher/access.log missing. Creating.
    Warning: /var/log/apt-cacher/error.log missing. Creating.

    Configuring the Clients

    With a web browser check the accessibility of apt-cacher

    http://”your-untangle-utm”:3142

    You should get the apt-cacher configuration web page for clients.
    You can configure your client as per the instruction on the page or you can use this simpler method.

    # touch /etc/apt/apt.conf.d/20proxy

    # nano /etc/apt/apt.conf.d/20proxy

    add this single line were XXX.XXX.XXX.XXX is the IP address of your Untangle UTM

    Acquire::http { Proxy "http://XXX.XXX.XXX.XXX:3142"; };

    Save and close then run apt-get update. Your client system should be ready to use the apt-cacher cache.
    Last edited by tmedcalf; 08-05-2012 at 02:04 PM.

  2. #2
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    26,542

    Default

    Correct me if I'm wrong, but since Untangle uses custom repositories, this configuration is useless? You'll be caching Untangle specific apt sources, and if you leave general Debian Apt sources active, your box breaks at 2am.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  3. #3
    Newbie
    Join Date
    May 2008
    Location
    Central United States
    Posts
    14

    Default Does not cache Untangle specifice Repos only the Repos the client requests

    I have been using this for a while and it works correctly. In my experience, verified by watching apt-get update, (no errors because it cannot find the repo) and examination of the cache both apt-cacher and apt-cacher-ng both check, and cache the repository the client asks for and nothing else. (To check the cache use the ls command: ls /var/cache/apt-cacher/packages)This means that you can use it with multiple distros and multiple versions of the same distro. Apt-cacher is not as graceful as apt-cacher-ng, apt-cacher appears to dump everything in one place, while apt-cacher-ng separates by distro, then version, then sets up the cache very much like a mirror.

    I like apt-cacher-ng better but have not been able to get it to work properly in Debian Lenny or Untangle, I do use it in Ubuntu.

    Since you do not configure your Untangle-box to use the cache none to the Untangle specific packages are cached.

    Using package caching programs does mean that you need a larger hard drive.
    Last edited by tmedcalf; 08-05-2012 at 04:35 PM. Reason: More Information

  4. #4
    Newbie
    Join Date
    May 2008
    Location
    Central United States
    Posts
    14

    Default Thanks for reminding me to say this.

    Thank you for reminding me to say that it is important to turn the Debian repos back off after any modification. The minimum reason is that this is a security distro so making your own changes is a risk. Leaving the system open to more changes without your knowledge is a larger risk.

    And we really do not want to break this great ditsro.

  5. #5
    Untangle Ninja sky-knight's Avatar
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Posts
    26,542

    Default

    Ok, I just wanted to be certain it wasn't caching Untangle's stuff. I don't have any experience with this package, and a quick Google just returned some things that I was afraid could hurt someone.

    If it's caching the repos the client asks for, then it's basically just a proxy for apt on other machines. If you do a ton of Linux work, this could be a valuable hack. Personally? I'd just spin up a Ubuntu VM and use it. It's small, and fits anywhere, and could easily operate on any other server you had around via any number of virtualization options.

    And the drive warning is fair, but Untangle uses so little and the recent versions aren't doing the 80gb silliness anymore, just a nice big /. So that shouldn't be as much of an issue for new installs.
    tmedcalf likes this.
    Rob Sandling, BS:SWE, MCP
    NexgenAppliances.com
    Phone: 866-794-8879 x201
    Email: support@nexgenappliances.com

  6. #6
    Newbie
    Join Date
    May 2008
    Location
    Central United States
    Posts
    14

    Default

    That is exactly what apt-cacher and apt-cacher-ng are, an apt proxy. It is not a mirror, it only gets and caches what you actualy asked for. Making subsequent dowloads to other machines on the network faster. Useful if you have many machines or limited bandwidth.
    Last edited by tmedcalf; 08-05-2012 at 06:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2