The http_proxy Environment Variable

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
  1. Open the Control Panel and click the System icon.
    The System Properties dialog is displayed.
  2. On the Advanced tab, click on Environment Variables.
    The Environment Variables dialog is displayed.
  3. Click New in the System variables panel.
    The New Sytem Variable dialog is displayed.
  4. 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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值