在 Ubuntu 中使用 wget 代理的问题 [英] Problem of using proxy with wget in Ubuntu

查看:88
本文介绍了在 Ubuntu 中使用 wget 代理的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我,我想使用 wget 命令从 dev.opennebula.org 下载文件,但我遇到了代理问题.现在,我已经在文件/etc/wgetrc 中设置了 http-proxy 值,我使用命令 wget --proxy-username=username --proxy-password=password URL 但结果是

Please help me, I want to download file from dev.opennebula.org using command wget but I have a problem with proxy. Now, I have already set the http-proxy value in file /etc/wgetrc and I use command wget --proxy-username=username --proxy-password=password URL but the result is

Connecting to proxy.mmcs:8080 failed: Connection timed out.
Retrying.

我确定我正确设置了代理名称和端口.我该怎么做以及我可以使用其他命令来下载该文件.

I am sure that I set the proxy name and port correctly. How can I do and can I use other commands to download that file.

谢谢.

推荐答案

sudo gedit/etc/bash.bashrc 中添加这些行:

export http_proxy=http://username:password@proxyserver.net:port/
export https_proxy=http://username:password@proxyserver.net:port/
export ftp_proxy=http://username:password@proxyserver.net:port/

sudo gedit/etc/environment 中添加这些行:

http_proxy=http://username:password@proxyserver.net:port/
https_proxy=http://username:password@proxyserver.net:port/
ftp_proxy=http://username:password@proxyserver.net:port/

sudo gedit/etc/apt/apt.conf 中添加这些行:

Acquire::http::Proxy "http://username:password@proxyserver.net:port";
Acquire::https::Proxy "http://username:password@proxyserver.net:port";
Acquire::ftp::Proxy "http://username:password@proxyserver.net:port";

来源:公司环境中的 Ubuntu Linux 代理设置.

这篇关于在 Ubuntu 中使用 wget 代理的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆