Z
Z
Ziklon2010-11-15 15:58:39
linux
Ziklon, 2010-11-15 15:58:39

Setting up a proxy connection in Ubuntu Server 10.10

The server receives network settings via DHCP, the Internet via a proxy.
Pings ya.ru but is not updated and packages are not installed. Nothing works. I execute in the terminal Nothing changes ... I wrote the following lines in the file /etc/bash.bashrc Again it does not work I try this: Again it does not work Google did not help. How to set it up?

# sudo apt-get update
# sudo apt-get upgrade



export http_proxy=http://[email protected]:Proxy:Port


export http_proxy=http://[email protected]:ProxyPort
export ftp_proxy=http://[email protected]:ProxyPort



sudo vi /etc/apt/apt.conf.d/proxy

вставляю это

Acquire::http::Proxy "http://proxy:port/";
Acquire::ftp::Proxy "ftp://proxy:port/";
Acquire::::Proxy "true";




Answer the question

In order to leave comments, you need to log in

9 answer(s)
A
Alexander Baumgertner, 2010-11-15
@alexbaum

It worked for me like this:
In the file /etc/apt/apt.conf (you have /etc/apt/apt.conf.d/proxy)
Edit the line:
$sudo nano /etc/apt/apt.conf
$Acquire:: http::Proxy "http_proxy=http://login:[email protected]:port";
via https://help.ubuntu.com/community/AptGet/Howto

V
Vladimir, 2010-11-16
@koef

Maybe the fact is that you register export http_proxy=http://[email protected]:Proxy:Port under your account, and then when you update, you increase the rights to root. What if you do sudo -i, and after that:
#export http_proxy=http://[email protected]:Proxy:Port
#apt-get update && apt-get upgrade
And proxy with authorization? Did you forget to enter your password?
export http_proxy=http://user :pass @ProxyAddress:Proxy:Port
Well, in general, I always had enough:
Acquire::ftp::Proxy "http://username:[email protected]:port/";
Acquire::ftp::Proxy "ftp://username:[email protected]:port/";
Acquire::::Proxy "true";
in /etc/apt/apt.conf.d/proxy
and
export http_proxy=http://user:[email protected]:Port
export ftp_proxy=http://user:[email protected]:Port
just try to extract something with wget, it will immediately become clear whether it sees the proxy at all, or maybe the problem is in passing through the proxy

D
demshyn, 2014-03-13
@demshyn

On Raspbian
sudo nano /etc/apt/apt.conf.d/70debconf
Added lines:
Acquire::http::Proxy " http://username:[email protected]:port/";
Acquire::ftp::Proxy " ftp://username:[email protected]:port/";
Acquire::::Proxy "true";
apt-get update via proxy worked

V
ValdikSS, 2010-11-15
@ValdikSS

in .wgetrc try to write a proxy

V
Vladimir, 2010-11-16
@koef

In any case, the disk should not ask if the packages are pulled from the Internet. So you only have local repositories connected.
Check your /etc/apt/sources.list
For me it looks like this .

X
XRay39, 2010-11-15
@XRay39

Try
Acquire::http::Proxy " username @proxy:port/";
Acquire::ftp::Proxy "ftp://[email protected]:port/";
Acquire::::Proxy "true";

Z
Ziklon, 2010-11-15
@Ziklon

Tried like this
Acquire::ftp::Proxy "http://username:[email protected]:port/";
Acquire::ftp::Proxy "ftp://username:[email protected]:port/";
Acquire::::Proxy "true";
Also not hello. :(

Z
Ziklon, 2010-11-15
@Ziklon

Thanks, I'll try tomorrow.

S
solowk, 2014-08-07
@solowk

TS did everything right, only to use these environment variables you need to call sudo with the "-E" key, which exports the current environment variables for root. Those. "sudo -E apt-get update"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question