Linux proxy settings

Source: Internet
Author: User

Because the company must be through the agent to sisu the network, so the agent's setup

First, the browser settings agent

Add the following to your. BASHRC or. Bash_profile inside.

Export all_proxy= ' sockets://proxy_ip:proxy_port/' export ftp_proxy= ' http://proxy_ip:proxy_port/' export http_proxy= ' http://proxy_ip:proxy_port/' export https_proxy= ' http://proxy_ip:proxy_port/'

Then execute:

$ source ~/.BASHRC

This allows the browser to use the proxy.

Second, Apt-get set up the agent

in Ubuntu 10.10 and later versions, Apt-get no longer reads the $http_proxy variable, and the workaround is to modify the Apt-get configuration file:

$ sudo vim/etc/apt/apt.confacquire::http::p Roxy "http://proxy_ip:proxy_port/"; acquire::ftp::p Roxy "FTP://PROXY_IP: proxy_port/"; Acquire::https::p Roxy "https://proxy_ip:proxy_port/";

Apt-get also supports the-C mode specifying configuration files and-O Specifying configuration entries:

If you add the above configuration to ~/apt_proxy.conf, you can use it so that the default configuration is not modified and the proxy is executed

$ sudo apt-get-c ~/apt_proxy.conf update

Or use a configuration item:

$ sudo apt-get-o acquire::http::p roxy= "http://proxy_ip:proxy_port/" update


Linux proxy settings

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.