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

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s