Linux system (used in this article is the CentOS6.4 host as a client, in a network with network proxy, there are several places to do the Client Agent configuration:
1 , set up the network agent under the graphical interface
2 , environment variables in the system set up the network proxy
3 , using YUM proxy settings when
4 , proxy settings for the application itself
1 , the network agent under the graphical interface
after the system installs the graphical interface, the system–> preferences–> Network Proxy location, you can open the network proxy's settings interface, such as
the proxy settings here are set to some GUI when the program accesses the network, it provides a configuration, but such as using Firefox when, in Firefox you still need to configure the network proxy in the program itself to access the Web page (and Firefox After you configure the network agent in, even if it is not configured here, Firefox will be able to access the Web page).
the configuration here, the actual location saved is ~/.gconf/system/proxy Catalogue with the Http_proxy in the catalog
650) this.width=650; "Width=" 997 "height=" 719 "title=" snag-0271.jpg "style=" WIDTH:569PX;HEIGHT:324PX; " alt= "Wkiom1qii4ra9ga1aapu3xbpunc121.jpg" src= "http://s3.51cto.com/wyfs02/M01/48/6D/ Wkiom1qii4ra9ga1aapu3xbpunc121.jpg "/>
2 , agent-related environment variables
Common environment variables related to proxies are:http_proxy,https_proxy,ftp_proxy
When some command-line tools require a proxy, proxy settings, such as curl, are used here .
Format: Export http_proxy= "Http://username:[email protected]<proxyserver>:<proxyport>"
To enable this configuration to take effect permanently, add this configuration to the /etc/profile/**.sh or ~./bash_profile Medium can
[[email protected] ~]# vim/etc/profile.d/proxy.sh # #新创建proxy. SH Add the following three segments exporthttp_proxy= "Http://USERNAME: [Email protected]<proxyserver>:<proxyport> "exporthttps_proxy=" Http://username:[email protected]<p Roxyserver>:<proxyport> "exportftp_proxy=" Http://username:[email protected]<proxyserver>:< Proxyport> "
3 , YUM the proxy settings in
If a proxy server is used in a network environment, the agent needs to be configured in the Yum warehouse configuration as a client to use the yum source based on internet access
#vim/etc/yum.conf Add the following paragraph proxy= http://<proxyserver>:<proxyport> proxy_username=username Proxy_password=password#yum Clean All#yum Makecache
4 , proxy settings for the application itself
Some GUI applications, even if they are configured in the system, still need to be configured with proxies, such as Firefox(edit-> Preferences can be configured, do not repeat here);
and some command tools, such as Curl If the environment variable is configured in the system Http_proxy , you can use it directly, without additional configuration. If the agent is not configured in an environment variable, you will need to specify the proxy with the appropriate options when using curl, as follows:
#curl-i-X http://<proxyserver>:<proxyport>-U <username:password>-X or--proxy command connection HTTP proxy address-U or--proxy-user specifies the user name and password of the connection agent
This article is from the Zebra Linux blog, so be sure to keep this source http://zebralinux.blog.51cto.com/8627088/1548813
Some proxy settings for the Linux system as a client