Syndicate content

Add a cache to upgrade your LAN servers faster

Since I have several computers running Ubuntu, I like to have them up to date, but it always takes a bit of time to download the new packages. I think those should be downloaded only once and then shared between all my computers (I also run VPS which can benefit from this sharing.)

So, I decided to finally look into it and the simplest was to install apt-cacher-ng on my main server:

sudo apt-get apt-cacher-ng

That's it for the main server (from what I've read, at least, although I am thinking that maybe we need to tell apt-get to check that cache first even on the main system?)

Next, on each of the computers that you want to gather information from the outside enter a proxy definition like this:

# To create/open the file
vim /etc/apt/apt.conf.d/02proxy

# First a proxy (change IP address with your main server IP):
Acquire::http { Proxy "http://192.168.0.1:3142"; };

# Second, entries to skip the proxy if required (i.e. entries using HTTPS)
# Enter the domain name and then DIRECT, enter multiple separated by ';'
Acquire::http::Proxy { top-secret.example.com DIRECT; };

This will already work pretty well, but once in a while you will have to upgrade a file which requires more rights on the server side. This means you need to enter a user name and a password of someone who can run apt-get.

# Open the security.conf file
vim /etc/apt-cacher-ng/security.conf

# Edit the AdminAuth variable with your administrator name and password:
AdminAuth: james:bond

That edit will prevent the 500 Missing Content-Length errors you were seeing.

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • QuickBooks
  • scan

    In software, scanning means checking the content of memory or a disk for something. In hardware, you have scanners that read the colors on a piece of paper. In the C language, you have a function called sscan() (String Scan,) which I recommend you avoid, but is used to scan the content of a string.

  • schema
  • visual
  • Warthog