Files
firestuff/2016-04-02-apt-caching-for-debootstrap.html
2019-04-14 22:45:25 +00:00

27 lines
849 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--# set var="title" value="apt caching for debootstrap" -->
<!--# set var="date" value="April 2, 2016" -->
<!--# include file="include/top.html" -->
<p>If youre building system images, youre going to do a lot of debootstrap, which is going to fetch a lot of packages. On a fast system, thatll be the slowest part of the process. Heres how to cache.</p>
<h3>Install apt-cacher-ng</h3>
<pre><code>sudo apt-get install squid-deb-proxy
</code></pre>
<h3>Tell programs to use the proxy</h3>
<pre><code>export http_proxy=http://127.0.0.1:8000
# Note that you'll need to re-export this before any use of debootstrap
</code></pre>
<h3>Tell sudo to pass through http_proxy</h3>
<pre><code>sudo visudo
# Add the line after the env_reset line:
Defaults env_keep += "http_proxy"
</code></pre>
<!--# include file="include/bottom.html" -->