ubuntu’s apt-get and wget use proxy

apt-get use proxy

Add following line into the file /etc/apt/apt.conf

Acquire::http::Proxy "http://proxy.server:portnum/";

wget use proxy

Take a look at your .wgetrc or /etc/wgetrc and define there your proxy server. Then use wget –proxy-user=.. –proxy-passwd=..

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://proxy.yoyodyne.com:port/
http_proxy = http://proxy.yoyodyne.com:port/
ftp_proxy = http://proxy.yoyodyne.com:port/

Or we can edit /etc/bash.bashrc

Add following two lines at the lastest in the file.

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

from: How to use apt-get behind proxy server (Ubuntu/Debian)




WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )


連結到 %s