“UbuntuHelp:Apt-Cacher-Server”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第11行: | 第11行: | ||
1. Install apt-cacher and apache2 webserver | 1. Install apt-cacher and apache2 webserver | ||
− | + | sudo apt-get install apt-cacher apache2 | |
2. Enable apt-cacher | 2. Enable apt-cacher | ||
− | + | Edit /etc/default/apt-cacher and change autostart to 1 | |
Note: I had problems doing this on a machine with apache already installed. | Note: I had problems doing this on a machine with apache already installed. | ||
第30行: | 第30行: | ||
1. Modify your sources.list | 1. Modify your sources.list | ||
In client /etc/apt/sources.list insert apt-cacher-server/apt-cacher/ in each line, ie | In client /etc/apt/sources.list insert apt-cacher-server/apt-cacher/ in each line, ie | ||
− | + | deb http://archive.ubuntu.com/ubuntu/ dapper main restricted | |
becomes | becomes | ||
− | + | deb http://apt-cacher-server/apt-cacher/archive.ubuntu.com/ubuntu/ dapper main restricted | |
Then run | Then run | ||
− | + | apt-get update | |
2. Use a proxy. | 2. Use a proxy. |
2007年5月24日 (四) 09:02的版本
Introduction
This page describes the installation and configuration of apt-cacher. It was drawn from http://www.debuntu.org/how-to-set-up-a-repository-cache-with-apt-cacher and Ubuntu Hacks by Oxer, Rankin, and Childers http://www.oreilly.com/catalog/ubuntuhks/
Server Installation
1. Install apt-cacher and apache2 webserver sudo apt-get install apt-cacher apache2
2. Enable apt-cacher Edit /etc/default/apt-cacher and change autostart to 1
Note: I had problems doing this on a machine with apache already installed.
Then test by going to http://server/apt-cacher to verify that it's running.
Server Configuration
Edit /etc/apt-cacher/apt-cacher.conf if you want to change any options. The only one I changed was admin_email.
Client Configuration
There are two ways to configure your clients to use apt-cacher.
1. Modify your sources.list In client /etc/apt/sources.list insert apt-cacher-server/apt-cacher/ in each line, ie deb http://archive.ubuntu.com/ubuntu/ dapper main restricted becomes deb http://apt-cacher-server/apt-cacher/archive.ubuntu.com/ubuntu/ dapper main restricted Then run apt-get update
2. Use a proxy. <If anyone knows how to make this work, please fill this section in.>
NEEDED: How to configure a laptop so that it uses apt-cacher when connected to it's home network, and the regular repository when it's not.