LoginSignup
2
4

More than 5 years have passed since last update.

Proxy 環境下で rpm コマンドを使う際の設定ファイルの書き方

Last updated at Posted at 2018-09-19

rpm コマンドを使ってインターネット経由でパッケージをインストールする場合、Proxy 環境下ではどうすればいいのかを記す。

rpm コマンド実行ユーザ (主に root ユーザ) のホームディレクトリ直下に .rpmmacros というファイルを作成してそこに Proxy 設定を記述すればよい。

~/.rpmmacros
%_httpport 12345
%_httpproxy http://your.proxy.url

ちなみにデフォルトの設定値は、/usr/lib/rpm/macros というファイルに記述してあるため、そちらを直接編集してもよい。

コマンドラインオプションを使用する際は、以下のようなオプションを付与すればよい。

$ rpm --httpproxy http://your.proxy.url --httpport 12345
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4