Ubuntu 12.04 apt-Get/wget/gem install software using proxy

Source: Internet
Author: User

I. APT-Get proxy settings
Because the company accessed the Internet via proxy, Firefox's proxy settings were easy to handle, but the installation of software via apt-Get still failed, so I checked a lot of information, the most common method is the three methods circulating on the Internet. I tried it and failed it. I finally succeeded after reading the apt-get man in detail and shared it with you.
You can run the following command to install the software each time.

  1. Sudo apt-Get install software_name-O acquire: http: proxy = "http: // your_proxy_address: Port Number /"

Of course, Apt-Get also has a-C option, which can be used to specify which proxy configuration file to use. Therefore, you can also write all the proxy configurations in the file, and then execute:

  1. Sudo apt-get-C ~ /Apt_proxy.conf

The configuration file format is as follows:

  1. Acquire: http: proxy "http: // your_proxy_adress1: Port Number /";
  2. Acquire: ftp: proxy "ftp: // your_proxy_adress2: Port Number /";
  3. Acquire: https: proxy "https: // your_proxy_adress3: Port Number /";

It is convenient to add multiple proxy addresses to the configuration file. However, I suggest the first method. After all, there are few proxies!

Ii. wget proxy settings

  1. Wget-e http-proxy.satwe.com: 8080
    -Proxy = on-proxy-user = hamo-proxy-passwd = 8888-C
    Http://www.satwe.com

3. Gem proxy settings

  1. Sudo gem install -- http-proxy http: // localhost: 8888
    $ Gem_name

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.