Make it easier to update the Ubuntu system on the Intranet.

Source: Internet
Author: User
Still started the original title name (see http://www.linuxidc.com/Linux/2009-12/23516.htm), today in looking for the Intranet Ubuntu system update solution, saw a post on the site, very excited. You can take a look and find that the apt-proxy stuff is no longer in the Ubuntu (LTS) release version, it seems that this post is a little behind the trend. I checked the information. appro is currently available in the released version.

Still started the original title name (see http://www.linuxidc.com/Linux/2009-12/23516.htm), today in looking for the Intranet Ubuntu system update solution, saw a post on the site, very excited. You can take a look and find that the apt-proxy stuff is no longer in the Ubuntu 12.04 (LTS) release version, it seems that this post is a little behind the trend. I checked the information. approx is currently available in the released version. The official description is as follows:

Approx is an HTTP-based proxy server for Debian-style package archives. It fetches files from remote repositories on demand, and caches them for local use.
 
Approx saves time and network bandwidth if you need to install or upgrade. deb packages for a number of machines on a local network. each package is downloaded from a remote site only once, regardless of how many local clients install it. the approx cache typically requires a few gigabytes of disk space.

Approx also simplifies the administration of client machines: repository locations need only be changed in approx's configuration file, not in every client's/etc/apt/sources. list file.
 
Approx can be used as a replacement for apt-proxy, with no need to modify clients '/etc/apt/sources. list files, or as an alternative to apt-cacher.
 

Approx seems to have replaced apt-proxy and will not provide apt-proxy after 10.04.

The deployment of approx is extremely simple. First, deploy approx:
 
Sudo apt-get install approx
 
Use the following command to obtain the update address in the current/etc/apt/sources. list.
 
$ Grep-E "^ [^ #]" sources. list | cut-d ""-f2 | uniq
Http://au.archive.ubuntu.com/ubuntu/
Http://security.ubuntu.com/ubuntu configuration/etc/approx. conf file, add the following content


Ubuntu http://cn.archive.ubuntu.com/ubuntu.
Ubuntu-extras http://extras.ubuntu.com/ubuntu
Ubuntu-partner http://archive.canonical.com/ubuntu
Ubuntu security http://security.ubuntu.com/ubuntu

$ Sudo/etc/init. d/openbsd-inetd restart
* Restarting internet superserver inetd [OK]


After the service is restarted, the service runs on port 9999.
 
In the client configuration, you can change the/etc/apt/sources. list file of the client to your approx address:
 
Deb http: // approx: 9999/ubuntu/precise main restricted
Deb-src http: // approx: 9999/ubuntu/precise main restricted
Deb http: // approx: 9999/ubuntu/precise-updates main restricted
Deb-src http: // approx: 9999/ubuntu/precise-updates main restricted
Deb http: /approx: 9999/ubuntu/precise universe
Deb-src http: // approx: 9999/ubuntu/precise universe
Deb http: /approx: 9999/ubuntu/precise-updates universe
Deb-src http: // approx: 9999/ubuntu/precise-updates universe
Deb http: /approx: 9999/ubuntu/precise multiverse
Deb-src http: // approx: 9999/ubuntu/precise multiverse
Deb http: /approx: 9999/ubuntu/precise-updates multiverse
Deb-src http: // approx: 9999/ubuntu/precise-updates multiverse
Deb http: // approx: 9999/ubuntu/precise-backports main restricted universe multiverse
Deb-src http: // approx: 9999/ubuntu/precise-backports main restricted universe multiverse
Deb http: // approx: 9999/ubuntu precise-security main restricted
Deb-src http: // approx: 9999/ubuntu precise-security main restricted
Deb http: // approx: 9999/ubuntu precise-security universe
Deb-src http: // approx: 9999/ubuntu precise-security universe
Deb http: // approx: 9999/ubuntu precise-security multiverse
Deb-src http: // approx: 9999/ubuntu precise-security multiverse


You can delete other addresses. The rest is sudo apt-get update ~~~

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Related Article

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.