참고: apt 캐시 서버

개요


  • 캐시apt-get update; apt-get upgrade의 apt 패키지입니다.두 번째/두 번째 이후 LAN의 캐시 서버에서 파일을 가져옵니다.

  • Apt-Cacher NG is a caching HTTP proxy라고 합니다.
  • 관련
  • Apt-Cacher NG
  • Alioth: Apt-Cacher NG: Project Home

  • # 아, 이렇게 간단하게 끝낼 수 있는데 왜 아직까지 알아내지 못했는지.

    환경

  • apt 캐시 서버
  • Ubuntu 16.04
  • Raspberry Pi22016-09-23-raspbian-jessie.img 및lite
  • 클라이언트
  • Ubuntu 머신들
  • Raspberry Pi 등
  • # 고등어 Ubuntu(Intel) 클라이언트가 없어도 OK.반대로도 마찬가지다.

    단계

  • 서버: apt-cacher-ng
  • 설치
  • 클라이언트: apt 설정(1 파일 추가-/etc/apt/apt.conf.d/02proxy
  • 서버 설정

  • apt-chcher-ng 배포
  • 설치: (패키지 설치 및 자체) sudo apt-get update; sudo apt-get install apt-cacher-ng ; echo 'Acquire::http::Proxy "http://127.0.0.1:3142";' | sudo tee /etc/apt/apt.conf.d/02proxy
  • IP 주소 확인: ifconfig eth0 | grep inet\ addr
  • 예제 표시
    pi@raspberrypi:~ $ ifconfig eth0 | grep inet\ addr 
              inet addr:10.10.6.165  Bcast:10.10.7.255  Mask:255.255.248.0
    pi@raspberrypi:~ $ 
    
  • 구성 파일: /etc/apt-cacher-ng/acng.conf
  • 파일이 캐시된 곳: CacheDir: /var/cache/apt-cacher-ng tail -f /var/log/apt-cacher-ng/apt-cacher.log 같은 말은 많이 캐시됩니다.
  • 로그를 저장하는 곳: LogDir: /var/log/apt-cacher-ngtail -f /var/log/apt-cacher-ng/apt-cacher.log, 방문할 수 있습니다.
  • 포트 사용: Port:3142
  • 보고서 액세스 페이지: ReportPage: acng-report.htmlhttp://サーバのIP:3142/acng-report.html 보고서를 보려면(Count Data)
  • 클라이언트 설정

  • /etc/apt/apt.conf.d/02proxy 제작http://鯖のIP:3142//etc/apt/apt.conf.d/02proxy
    Acquire::http::Proxy "http://10.10.6.165:3142";
    
  • 명령행에서 echo 'Acquire::http::Proxy "http://AptCacherNg_no_IP:3142/";' | sudo tee /etc/apt/apt.conf.d/02proxy ; cat /etc/apt/apt.conf.d/02proxy
  • 실행 예
    pi@raspberrypi:~ $ echo 'Acquire::http::Proxy "http://10.10.6.165:3142";' | sudo tee /etc/apt/apt.conf.d/02proxy ; cat /etc/apt/apt.conf.d/02proxy
    Acquire::http::Proxy "http://10.10.6.165:3142";
    Acquire::http::Proxy "http://10.10.6.165:3142";
    pi@raspberrypi:~ $ 
    
  • 이후 일반적인 설치 또는 업그레이드를 수행하면 됩니다. sudo apt-get update; sudo apt-get upgrade
  • 기타

  • 나는 서버의 기계로서 LAN, 저장 접근이 빠른 것이 좋다고 생각한다.
  • 좋은 웹페이지 즐겨찾기