| View previous topic :: View next topic |
| Author |
Message |
turfcutter
Joined: Sun Nov 04, 2007 3:46 pm Posts: 11 Location: Utrecht, Holland
|
Posted: Sat Dec 01, 2012 4:15 pm Post subject: making local repository for apt and synaptic |
|
|
| How do I make a local repository for apt and synaptic on Xubuntu? My old copy of "Linux Cookbook" gives a simple procedure using apt-proxy but that seems not to be available anymore (at least I cannot find it with Synaptic). I have tried googling but most of the answers assume that I want to mirror the entire Ubuntu repositories when all I want is to keep a cache of installed software on one machine so that when the other computers in the house receive updates they get them from the local cache rather than download them again from the internet. This must be quite a common requirement so I am surprised that it is so difficult to find the solution. |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Sat Dec 01, 2012 6:05 pm Post subject: |
|
|
Google apt-cacher-ng
basically
1. apt-get install apt-cacher-ng
2. configure all computers to use computer you just installed apt-cacher-ng as proxy (realllllly simple)
3. Done
This basically.
Pretty sure it was in the mag once upon a time to.
Anyways hope that helps
This also tells you about the pretty dashboard. _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
turfcutter
Joined: Sun Nov 04, 2007 3:46 pm Posts: 11 Location: Utrecht, Holland
|
Posted: Mon Dec 03, 2012 12:39 pm Post subject: |
|
|
Thanks for the tip. I installed apt-cacher-ng but the instructions on the link you gave seem very complicated to me. For instance I puzzled for two days over the beginning of step 2, “# search & replace 192.168.1.100 by the IP of the machine that will act as apt-cacher-ng server”, until I finally realized that it refers to the following instructions and not to any config files on my machine. Okay, you didn't realise you were trying to help an idiot. I think these instructions might be easier to follow if they just said “change file so-and-so” to include “such-and-such” instead of this geeksprach with pipes, tees and logical ORs. I am reluctant to just copy and paste them into a terminal because I don't understand them and the page seems to be about 4 years old so I have googled for other sites that might confirm them
This link, http://acidborg.wordpress.com/2010/06/24/how-to-install-and-configure-apt-cacher-ng-on-ubuntu-server-10-04/, looks a lot simpler but it is has some configuration details for /etc/apt-cacher-ng/acng.conf. I looked at this file and most of these are already included except for the PidFile setting which is commented out. Also it says I have to restart apt-cacher-ng but it doesn't say that I have to put the line Acquire::http { Proxy "http://your-apt-cacher-ng-server:3142"; }; on the server machine as well. The link you gave me says nothing about restarting apt-cacher-ng but it does say that I should do the configuration on the server as well as the clients.
I wonder if you would mind clarifying this, bearing in mind that I get confused if you show me two shovels and tell me to take my pick. |
|
| Back to top |
|
 |
Dutch_Master LXF regular
Joined: Tue Mar 27, 2007 2:49 am Posts: 2353
|
Posted: Mon Dec 03, 2012 1:19 pm Post subject: |
|
|
Bookmark these pages:
http://ss64.com/bash/
http://tldp.org/
The latter has some outdated documents, others may still be valid. Cross-reference the info with the man-page of the command. |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Mon Dec 03, 2012 1:21 pm Post subject: |
|
|
Just looked at my acng.conf, I haven't touched my conf at all to be honest. You need to restart apt-cacher-ng if you change the conf, otherwise it won't use any new or changed settings. If you haven't changed anything you don't need to restart it, however restarting it won't harm it in any way.
I have put
| Code: |
Acquire::http { Proxy "http://your-apt-cacher-ng-server:3142"; };
|
on all my machines on the network. If you don't put it on your server it just means that your server won't be using you proxy, so for instance if you have 2 machines, 1 is the server, 1 is another client, and only the client is using the proxy and you update a package, that package will still get downloaded twice, once on the server, once on the client. If you add another client and tell it to use the proxy it won't download the package from the internet again, it will get it from the proxy as the other client has already downloaded it.
I think the point I'm trying to make is that I have configured my server to use itself as a proxy and had no problems so far.
So in summary if you do step 1 & 4 on http://acidborg.wordpress.com/2010/06/24/how-to-install-and-configure-apt-cacher-ng-on-ubuntu-server-10-04/ , you should be fine. _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Mon Dec 03, 2012 1:25 pm Post subject: |
|
|
Opps sorry can't read, I have commented out the Acquire::http.... on my server, so it seems that did cause a problem.
So follow step 1 & 4 on that link exactly and you should be fine! _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
turfcutter
Joined: Sun Nov 04, 2007 3:46 pm Posts: 11 Location: Utrecht, Holland
|
Posted: Tue Dec 04, 2012 1:24 pm Post subject: |
|
|
Thanks very much for clarifying these points. I have created the file 02proxy as suggested and it seems to work (at least, the latest upgrades would not download until I opened port 3142 in my server's firewall).
One last point: do I need to do separate configuration for Synaptic as described in docplastic's post? |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Wed Dec 05, 2012 6:14 pm Post subject: |
|
|
I have no idea about Synaptic I'm afraid, don't use it, just use apt. I suppose you could do an experiment to find out, block port 3142 on you server again and see if it updates  _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
turfcutter
Joined: Sun Nov 04, 2007 3:46 pm Posts: 11 Location: Utrecht, Holland
|
Posted: Mon Dec 24, 2012 10:44 am Post subject: |
|
|
| I configured Synaptic with the proxy server's IP and port number and it seems to work as long as port 3142 is open in my firewall. Thanks for your help. |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|