The source server name may be less accurate, meaning to create a network of its own, so long as there is Ubuntu through the server download installed software, server will be cached, the next Ubuntu request is directly from the cache.
Ubuntu source server is too slow recently, the network in Beijing is bad enough. Forced!
Install Apt-cacher First
- Apt-get Install Apt-cacher
Select the daemon mode during the installation process.
After loading, the contents of the/etc/default/apt-cacher file should read as follows:
- Autostart=1
So the service should have been started.
Modify a row of configurations into the/etc/apt-cacher/apt-cacher.conf file to allow any client access:
- allowed_hosts = *
Restart Service
Service Apt-cacher Restart
Then open the webpage: http://your_ip:3142/apt-cacher
Seeing the page indicates that the server started properly.
Add a line to the/etc/hosts file to help find the dl.google.com that Chrome relies on
203.208.45.206 dl.google.com
On the client's Ubuntu machine, create a file/etc/apt/apt.conf file or/etc/apt/apt.conf.d/01proxy file
The contents are as follows:
Acquire::http::P Roxy "http://your_server:3142";
Then run Apt-get update, in order to confirm that it really works. You can view the log files on the apt-cacher to the server to view the log file under the directory
/var/log/apt-cacher
Apt-cacher Service with a shelf Ubuntu