Apt-cacher Service with a shelf Ubuntu

Source: Internet
Author: User

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

    1. 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:

    1. 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:

    1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.