View previous topic :: View next topic |
Author |
Message |
hoyanf Tux's lil' helper
Joined: 27 Aug 2005 Posts: 80 Location: Malaysia
|
Posted: Fri Jul 13, 2007 8:25 am Post subject: HowTo Debian/Ubuntu with apt-proxy |
|
|
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 |
|
|
mattsteven Apprentice
Joined: 27 Oct 2003 Posts: 240 Location: Your Planet
|
Posted: Thu Jul 19, 2007 8:29 pm Post subject: |
|
|
You might consider prefixing your subject with [Howto] _________________ Matthew Steven
Linux-only desktop since 1998
Graying hair since 2006 |
|
Back to top |
|
|
|
|
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
|
|