LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2018, 02:08 PM   #1
cando
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
Setting up a mirror/proxy for ubuntu/debian


I set up a lot of machines and virtual machines using Debian, Linux Mint (Ubuntu), and rarely any other distribution.

Since bandwidth from my ISP is limited (they charge per block of GB transferred in a month) I thought I'd investigate the possibility of setting up a proxy on my server.

The idea being that since I install Debian a lot, it would be handy to have a cache of the files used regularly. An on-the-fly mirror if you will - it only downloads what is requested rather than mirroring the entire mirror. Like a web-caching proxy, but only for distribution files (ie only for apt/aptitude/apt-get).

I came across this on my searches which seems like what I'm wanting to do but it is A) based on CentOs, and B) too complicated for me to get working on a Debian/Ubuntu system:

http://www.perlmonks.org/?node_id=684293

Any ideas/help greatly appreciated.
 
Old 02-08-2018, 02:39 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,495

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Setting up a Debian archive mirror
https://www.debian.org/mirror/ftpmirror

Might help..
 
Old 02-08-2018, 02:57 PM   #3
cando
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BW-userx View Post
Setting up a Debian archive mirror
https://www.debian.org/mirror/ftpmirror

Might help..

Thanks but that would require me downloading a ton of stuff I don't need, using more bandwidth than I'm trying to save!

I am currently reading about apt-cacher which looks like it suits my needs, still reading though...

Last edited by cando; 02-08-2018 at 03:08 PM.
 
Old 02-08-2018, 03:13 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
I would just share /var/cache/apt/ over NFS from one machine. This way if any machine downloads a deb all other machines can use it.
 
Old 02-08-2018, 03:27 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ Win10
Posts: 9,495

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Quote:
Originally Posted by cando View Post
Thanks but that would require me downloading a ton of stuff I don't need, using more bandwidth than I'm trying to save!

I am currently reading about apt-cacher which looks like it suits my needs, still reading though...
well it did show
Partial mirroring.
or like you're seemingly looking into a means to just save whatever it was you installed on your system somewhere else. the install deb's it took to install whatever it was you installed?

why not try setting up a script you run or set it up to run every time you install something to copy over your cache to a different hdd , perhaps via into a different pc. so every time you install something run the script it copies it over to your holding place.

or on the receiving end have it setup in a OS to run and check your cache and get whatever new stuff you've downloaded into your cache. then suck it over into a holding spot on that pc.

that's if Debian keeps everything you download to install into a cache dir. it should not be that much to do, if you're using your system to get your debs from. not even a server set up even. just a user setup cron job with access to ssh or whatever means you want to get into a local network to get it over to your main system.

gain root access to your deban/ cache and check for dups, all no dups are then copied over to it into your holding directory on the other system.

something like that. this way no bandwidth is being used from your Provider.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building a Debian Wheezy/Ubuntu Precise Mirror using apt-mirror bennetfox Linux - Server 16 02-23-2013 04:56 PM
LXer: How to choose the best mirror in Debian, Gentoo and Ubuntu LXer Syndicated Linux News 0 05-15-2011 01:42 AM
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 06:33 PM
Setting up authenticated proxy address in Debian Jaegermeister Linux - Networking 1 02-08-2006 12:13 PM
Setting up Debian proxy with firewall and antivirus ghanalinux Linux - Networking 1 07-02-2005 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration