#author("2023-01-23T14:16:27+00:00","default:sysosa","sysosa")
#author("2025-11-02T14:40:24+00:00","default:sysosa","sysosa")
インターネットのお外に出かけるのに proxy を要求される環境での設定云々

proxyサーバの構築 [[proxy/server]]



***yum/dnf(RHEL7/8系) [#t71def0b]
単純に/etc/yum.confに追加でいいみたい
#code(nonumber){{
echo "proxy=http://10.10.0.254:3128" >> /etc/yum.conf
}}


***apt(ubuntu系) [#k184105b]
#code(nonumber){{
vi /etc/apt/apt.conf.d/99proxy

Acquire::http::Proxy "http://10.10.0.254:3128";
Acquire::https::Proxy "http://10.10.0.254:3128";

}}
あるいはaptを実行するユーザに環境変数「http_proxy」と「https_proxy」を加える

#code(nonumber){{
export http_proxy=http://10.10.0.254:3128
export https_proxy=http://10.10.0.254:3128
}}

***wget [#df244137]
システム全体に波及なら「/etc/wgetrc」に記載
#code(nonumber){{
echo "https_proxy=http://10.10.0.254:3128/" > /etc/wgetrc
}}

wgetのコマンドの引数としてなら「-e」オプションでHTTPS_PROXYを追加
#code(nonumber){{
wget -e HTTPS_PROXY=http://10.10.0.254:3128 https://web.chaperone.jp/index.html 
}}

環境変数に記載なら
#code(nonumber){{
export http_proxy=http://10.10.0.254:3128/
export https_proxy=http://10.10.0.254:3128/
}}

&size(10){「apt」コマンドと同じ};

***curl [#dc4930e3]
システム全体に波及なら「/etc/curlrc」に追記
#code(nonumber){{
proxy = "http://10.10.0.254:3128"
}}

curlのコマンド引数にするなら「-x」で指定
#code(nonumber){{
curl http://web.chaperone.jp -x http://10.10.0.254:3128
}}

環境変数なら
#code(nonumber){{
export http_proxy=http://10.10.0.254:3128/
export https_proxy=http://10.10.0.254:3128/
}}
&size(10){これで「apt」「wget」と共通};


***git [#c7fc8f90]
「git config」で定義
#code(nonumber){{
git config --global http.proxy http://10.10.0.254:3128
}}

***conda [#l887031a]
「conda config」で定義
#code(nonumber){{
conda config --set proxy_servers.http http://10.10.0.254:3128
conda config --set proxy_servers.https http://10.10.0.254:3128
}}

***pip [#cef10550]
pipのコマンド引数で対応するなら「--prpxy」を使用する
#code(nonumber){{
pip install scipion-installer --proxy http://10.10.0.254:3128
}}
恒久的には「~/.pip/pip.conf」を用意する
#code(nonumber){{
vi ~/.pip/pip.conf

[global]
proxy = http://10.10.0.254:3128
}}

***R [#ye9c23fd]
環境変数なら
#code(nonumber){{
export https_proxy="http://10.10.0.254:3128"
}}
の定義で行ける.  &size(10){これでこの設定方法は「apt」「wget」「curl」と同じに};

恒久的なら
#code(nonumber){{
echo "https_proxy=http://10.10.0.254:3128/" >> ~/.Renviron
}}

***Singularity [#y117ac29]
環境変数なら
#code(nonumber){{
export http_proxy="http://10.10.0.254:3128"
export https_proxy="http://10.10.0.254:3128"
}}
&size(10){これでこの設定方法は「apt」「wget」「curl」「R」と同じに. 万能じゃね};

コマンドラインでは
#code(nonumber){{
HTTP_PROXY=${HTTP_PROXY} HTTPS_PROXY=http://10.10.0.254:3128/ singularity build ...
}}


***cryoSPARC [#m7ee5cf5]

参照[[cryoSPARC/memo#y33a1d77]]
1

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS