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
Linux, Solaris or HP-UX
Set the http_proxy environment variable using the command specific to your shell (e.g.
To make this change persistent, add the command to the appropriate profile file for the shell. For example, in
add a line like the following to your .bash_profile or .bashrc file:
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_proxywith 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.
setor
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
相关文章推荐
- Android使用AsynchronousHttpClient
- loadrunner处理HTTP重定向请求
- 【读书笔记】iOS网络-保护网络传输
- 【读书笔记】iOS网络-保护网络传输
- 让浏览器不再显示 https 页面中的 http 请求警报
- C++ 用libcurl库进行http 网络通讯编程
- NodeJS http 模块
- HTTP 长连接和短连接
- 360云后台(使用HTTP Cache服务器)
- ajax网络请求时候的data参数应该用JSON.stringify?
- 系统学习下python网络爬虫 笔记一
- arm 网络调试内核及文件系统(tftp下载内核,nfs挂载根文件系统)/x86下nfs挂载根文件系统
- iOS9 适配网络请求,适配分享失败,适配无法正常跳转到客户端
- HTTP 的重定向301,302,303,307
- Spark数据挖掘-基于 K 均值聚类的网络流量异常检测(1): 数据探索、模型初探
- Wireshark网络分析就这么简单 -- 目录
- 安卓网络编程1--ANR异常和Handler机制
- Java网络编程
- Linux学习之命令(网络、关机)
- Node.js实践HTTP安全认证之二~~摘要认证(理论)