Set proxy for Internet access in centos6

Source: Internet
Author: User

In Linux, user variables contain proxy environment settings, such as ftp_proxy, http_proxy, and rsync_proxy.

Let me give you an example! If we want to access the network through the HTTP proxy of the following proxy server, the settings are as follows:
Proxy.debian.org: 8080
Account: Debian
Password 123456

# Export http_proxy = Debian: 123456@proxy.debian.org: 8080

In this way, you can set it, but there is no disk, and we need to set it again when you restart the computer. To write the relevant script, refer to the following URL.

Http://hi.baidu.com/215317196/blog/item/b7161aed5f1f2e4879f05515.html

If you want to set all the proxies, you can write as follows:

# Export http_proxy = Debian: 123456@proxy.debian.org: 8080
# Export ftp_proxy = Debian: 123456@proxy.debian.org: 8080
# Export rsync_proxy = Debian: 123456@proxy.debian.org: 8080

If you do not have a user name or password, write it directly, for example, export http_proxy = "proxy.debian.org: 8080.

 

You can write the above environment variable in/etc/profile to read the environment variable as the machine starts.

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.