您的位置:首页 > 理论基础 > 计算机网络

The http_proxy Environment Variable

2015-11-09 10:07 555 查看
If you use a proxy server or firewall, you may need to set the http_proxy environment variable in order to access some url from
commandline.
Example : Installing ppm for perl or applying rpm in linux ,updating ubuntu

Set the http_proxy variable with the hostname or IP address of the proxy server:
http_proxy=http://proxy.example.org
If the proxy server requires a user name and password, include them in the following form:
http_proxy=http://username:password@proxy.example.org
If the proxy server uses a port other than 80, include the port number:
http_proxy=http://username:password@proxy.example.org:8080

Windows XP
Open the Control Panel and click the System icon.

The System Properties dialog is displayed.
On the Advanced tab, click on Environment Variables.

The Environment Variables dialog is displayed.
Click New in the System variables panel.

The New Sytem Variable dialog is displayed.
Add 
http_proxy
 with the appropriate proxy information (see examples above).

Linux, Solaris or HP-UX
Set the http_proxy environment variable using the command specific to your shell (e.g. 
set
 or
export
).
To make this change persistent, add the command to the appropriate profile file for the shell. For example, in 
bash
,
add a line like the following to your .bash_profile or .bashrc file:
http_proxy=http://username:password@hostname:port;
export $http_proxy
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: