Ubuntu apt: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
(Die Seite wurde neu angelegt: „Kategorie:Ubuntu == Configuring a proxy for apt == Put this into your /etc/apt/apt.conf.d/00proxy : <source lang=bash> // Options for the downloading routines…“)
 
No edit summary
Line 1: Line 1:
[[Kategorie:Ubuntu]]
[[Kategorie:Ubuntu|apt]]
== Configuring a proxy for apt ==
== Configuring a proxy for apt ==
Put this into your /etc/apt/apt.conf.d/00proxy :
Put this into your /etc/apt/apt.conf.d/00proxy :

Revision as of 14:57, 5 April 2016

apt

Configuring a proxy for apt

Put this into your /etc/apt/apt.conf.d/00proxy :

// Options for the downloading routines
Acquire
{
  Queue-Mode "host";       // host|access
  Retries "0";
  Source-Symlinks "true";

  // HTTP method configuration
  http
  {
    //Proxy::http.us.debian.org "DIRECT";  // Specific per-host setting
    Proxy "http://<user>:<password>@<proxy-host>:<proxy-port>";
    Timeout "120";
    Pipeline-Depth "5";

    // Cache Control. Note these do not work with Squid 2.0.2
    No-Cache "false";
    Max-Age "86400";     // 1 Day age on index files
    No-Store "false";    // Prevent the cache from storing archives
  };

  ftp
  {
    Proxy "http://<user>:<password>@<proxy-host>:<proxy-port>";
    //Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting

    Timeout "120";

    /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
       is prefered if possible */
    Passive "true";
    Proxy::Passive "true";
    Passive::http.us.debian.org "true"; // Specific per-host setting
  };

  cdrom
  {
    mount "/cdrom";

    // You need the trailing slash!
    "/cdrom"
    {
       Mount "sleep 1000";
       UMount "sleep 500";
    }
  };
};