Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HowTo Debian/Ubuntu with apt-proxy
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
hoyanf
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2005
Posts: 80
Location: Malaysia

PostPosted: Fri Jul 13, 2007 8:25 am    Post subject: HowTo Debian/Ubuntu with apt-proxy Reply with quote

It's works same manner with the favorite http-replicator, now not only we can serve localnets gentoo distfiles but we can do debian/ubuntu too and save those precious bandwidth...

Firstly we just need to unmask by keyword net-misc/apt-proxy

Then emerge net-misc/apt-proxy

Theres only two config files to edit :- Firstly /etc/apt-proxy/apt-proxy.conf then the /etc/xinet.d/apt-proxy

/etc/apt-proxy/apt-proxy.conf
APT_PROXY_CACHE=/var/cache/apt-proxy *** I use /var/www/localhost/htdocs/apt_cache

# Ubuntu
add_backend /ubuntu/ \
$APT_PROXY_CACHE/ubuntu/ \
http://archive.ubuntu.com/ubuntu/ \
http://my.archive.ubuntu.com/ubuntu/

# Ubuntu - Security
add_backend /ubuntu-security/ \
$APT_PROXY_CACHE/ubuntu/ \
http://security.ubuntu.com/ubuntu/

# Debian - Main
add_backend /main/ \
$APT_PROXY_CACHE/debian/ \
ftp.us.debian.org::debian/ \
ftp.de.debian.org::debian/ \
ftp2.de.debian.org::debian/ \
ftp.uk.debian.org::debian/

# Debian - Non-US
add_backend /non-US/ \
$APT_PROXY_CACHE/non-US/ \
ftp.de.debian.org::debian-non-US/ \
ftp2.de.debian.org::debian-non-US/ \
ftp.uk.debian.org::debian/non-US/

# Debian - Security
add_backend /security/ \
$APT_PROXY_CACHE/security/ \
security.debian.org::debian-security/ \
non-us.debian.org::debian-security/

CLEANUP_DAYS=30

The rest i left it as default...

/etc/xinet.d/apt-proxy

service apt-proxy
{
type = UNLISTED
port = 9999
protocol = tcp
socket_type = stream
bind = 192.168.1.1 *** added this as i have aliases for my net device
only_from = 192.168.1.0/24 *** You can release to all if you wish or maintain in LAN-NET
wait = no
user = apt-proxy
server = /usr/sbin/apt-proxy
server_args = /var/log/apt-proxy.log
disable = no
}

You can add or remove required servers/connections as fit for your use...

Then give a try...

Feel free to comment or advise on better config's...
_________________
WorkPC -> Xeon x3440 | Gigabyte P55-UD6 | 16GB DDR3 | HDD1 - 600GB | HDD2 - 500 GB | HDD3 - 1TB
HomePC -> Xeon x3320 | Gigabyte GA-EP45-UD3P | 8GB DDR2 | HDD1 - 500GB | HDD2 - 1TB


Last edited by hoyanf on Sun Jul 22, 2007 2:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
mattsteven
Apprentice
Apprentice


Joined: 27 Oct 2003
Posts: 240
Location: Your Planet

PostPosted: Thu Jul 19, 2007 8:29 pm    Post subject: Reply with quote

You might consider prefixing your subject with [Howto]
_________________
Matthew Steven
Linux-only desktop since 1998
Graying hair since 2006
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum