Quantcast
Channel: プログラム の個人的なメモ
Viewing all articles
Browse latest Browse all 860

【Linux】【Debian】パッケージ管理コマンド ~ apt系コマンド / あれこれ ~

$
0
0

■ プロキシ経由でapt系コマンドを実行するには...

方法は、以下の2通り
[1] 環境変数「http_proxy」等を使う場合
[2] /etc/apt/apt.confを使う場合

[1] 環境変数「http_proxy」等を使う場合

構文
export http_proxy="http://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"
export https_proxy="https://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"
export ftp_proxy="ftp://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"

# 認証がない場合は、「【ユーザID】:【パスワード】@」が不要

export http_proxy="http://admin:password@192.168.16.29:3128/"
export https_proxy="https://admin:password@192.168.16.29:3128/"
export ftp_proxy="ftp://admin:password@192.168.16.29:3128/"

[2] /etc/apt/apt.confを使う場合

構文
Acquire::http::proxy "http://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"
Acquire::https::proxy "https://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"
Acquire::ftp::proxy "ftp://【ユーザID】:【パスワード】@【プロキシ・ホスト名】:【プロキシ・ポート番号】/"

# 認証がない場合は、「【ユーザID】:【パスワード】@」が不要

Acquire::http::proxy "http://admin:password@192.168.16.29:3128/";
Acquire::https::proxy "https://admin:password@192.168.16.29:3128/";
Acquire::ftp::proxy "ftp://admin:password@192.168.16.29:3128/"

参考文献

http://d.hatena.ne.jp/mrgoofy33/20100726/1280154695

関連記事

パッケージ管理コマンド ~ apt系コマンド / apt-getなど ~

https://blogs.yahoo.co.jp/dk521123/34295880.html

Viewing all articles
Browse latest Browse all 860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>