「.NET 開発基盤部会 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
Linux環境でプロキシを設定する方法。
プロキシURLの設定方法
プロキシURLの設定方法
※ <USERID> や <PASSWORD> に @ や : などの記号が含まれる場合は、URLエンコードが必要。
※ システム全体のCA証明書バンドルとは別のユーザー向けの証明書ストア
シェル単位・ユーザー単位でプロキシ設定する最も一般的な方法
export http_proxy=http://proxy.example.com:8080 export https_proxy=http://proxy.example.com:8080 export ftp_proxy=http://proxy.example.com:8080 export no_proxy=localhost,127.0.0.1,.example.com
echo 'export http_proxy=http://proxy.example.com:8080' >> ~/.bashrc echo 'export https_proxy=http://proxy.example.com:8080' >> ~/.bashrc echo 'export no_proxy=localhost,127.0.0.1,.example.com' >> ~/.bashrc
source ~/.bashrc
以下は、ツールごとの話。
sh や bash、ksh など。
export http_proxy="http://proxy.example.com:8080" export https_proxy=$http_proxy
csh や tcshなど、レガシー環境の場合
setenv http_proxy "http://proxy.example.com:8080" setenv https_proxy $http_proxy
sudo vi /etc/apt/apt.conf
Acquire::http::proxy "http://proxy.example.com:8080"; Acquire::https::proxy "http://proxy.example.com:8080";
sudo tee /etc/apt/apt.conf.d/95proxies <<EOF Acquire::http::proxy "http://proxy.example.com:8080"; Acquire::https::proxy "http://proxy.example.com:8080";
sudo vi /etc/yum.conf
proxy=http://proxy.example.com:8080 proxy_username=<USERID> proxy_password=<PASSWORD>
Webブラウザの種類やデスクトップ環境(GNOME, KDEなど)によって異なる。
(w3m, lynx, curl, wget)
(Firefox, Chromium, Chrome)
ツール毎に、環境変数ではなく、専用の設定I/Fがあるものもある。
OSの証明書ストアとは別のバンドルを使用するものもある。