Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2595560
  • 博文数量: 2110
  • 博客积分: 18861
  • 博客等级: 上将
  • 技术积分: 24420
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-05 18:23
文章分类

全部博文(2110)

文章存档

2011年(139)

2010年(1971)

我的朋友

分类: LINUX

2010-04-12 11:53:55

 apt-cacher只缓存你曾经安装的软件包,不用缓存所有的ubuntu软件包。它可以用来代替apt-proxy,apt-proxy我感觉使用起来不太顺利会出现小问题。

  apt-cacher可以作为单独的HTTP代理,作为inetd后台,作为CGI程序运行。

  安装

  apt-get install apt-cacher

  安装后的文件

  /.

  /usr

  /usr/share

  /usr/share/apt-cacher

  /usr/share/apt-cacher/apt-cacher.pl

  /usr/share/apt-cacher/apt-cacher

  /usr/share/apt-cacher/apt-proxy-to-apt-cacher

  /usr/share/apt-cacher/apt-cacher-report.pl

  /usr/share/apt-cacher/apt-cacher-cleanup.pl

  /usr/share/apt-cacher/apt-cacher-precache.pl

  /usr/share/apt-cacher/apt-cacher-format-transition.pl

  /usr/share/apt-cacher/apt-cacher-import.pl

  /usr/share/apt-cacher/apt-cacher-lib.pl

  /usr/share/apt-cacher/apt-cacher-lib-cs.pl

  /usr/share/apt-cacher/install.pl

  /usr/share/apt-cacher/remove.pl

  /usr/share/apt-cacher/upgrade.pl

  /usr/share/doc

  /usr/share/doc/apt-cacher

  /usr/share/doc/apt-cacher/changelog.gz

  /usr/share/doc/apt-cacher/copyright

  /usr/share/doc/apt-cacher/README.Debian.gz

  /usr/share/doc/apt-cacher/NEWS.Debian.gz

  /usr/share/man

  /usr/share/man/man1

  /usr/share/man/man1/apt-cacher.1.gz

  /usr/sbin

  /usr/lib

  /usr/lib/cgi-bin

  /etc

  /etc/apt-cacher

  /etc/apt-cacher/apt-cacher.conf

  /etc/apt-cacher/apache.conf

  /etc/cron.daily

  /etc/cron.daily/apt-cacher

  /etc/logrotate.d

  /etc/logrotate.d/apt-cacher

  /etc/default

  /etc/default/apt-cacher

  /etc/init.d

  /etc/init.d/apt-cacher

  /usr/sbin/apt-cacher

  /usr/lib/cgi-bin/apt-cacher

  访问下面的地址可以查看apt-cacher是否安装好

   or hostname of the apt-cacher server>:3142/

  客户端使用apt-cacher的方式有两种

  最简单的是添加/etc/apt/apt.conf.d/01proxy文件,文件内容:

  Acquire::http::Proxy " or hostname of the apt-cacher server>:3142";

  另一个方式是按照下面修改source.list就可以使用apt-cacher

  deb  main restricted

  deb-src  main restricted

  deb -updates main restricted

  deb-src -updates main restricted

  deb  universe

  deb-src  universe

  deb -updates universe

  deb-src -updates universe

  deb  multiverse

  deb-src  multiverse

  deb -updates multiverse

  deb-src -updates multiverse

  deb -backports main restricted universe multiverse

  deb-src -backports main restricted universe multiverse

  deb  partner

  deb-src  partner

  # Line commented out by installer because it failed to verify:

  #deb http://security.ubuntu.com/ubuntu intrepid-security main restricted

  # Line commented out by installer because it failed to verify:

  #deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted

  # Line commented out by installer because it failed to verify:

  #deb http://security.ubuntu.com/ubuntu intrepid-security universe

  # Line commented out by installer because it failed to verify:

  #deb-src http://security.ubuntu.com/ubuntu intrepid-security universe

  # Line commented out by installer because it failed to verify:

  #deb http://security.ubuntu.com/ubuntu intrepid-security multiverse

  # Line commented out by installer because it failed to verify:

  #deb-src http://security.ubuntu.com/ubuntu intrepid-security multiverse

阅读(269) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~