プロキシの背後で RHEL 7 の epel を使用する

プロキシの背後で RHEL 7 の epel を使用する

私は Red Hat Enterprise Linux Server 7 を実行していますが、Extra Packages for Enterprise Linux (epel) リポジトリを動作させるのに問題があります (最終的には XFCE をインストールしたいです)。問題は会社のプロキシ設定にあると特定したと思います。

私はepelをインストールしました

wget http://dl.fedoraproject.org/pub/epel/7Server/x86_64/e/epel-release-7-9.noarch.rpm
sudo rpm -ivh epel-release-7-9.noarch.rpm

これはうまくいきました(プロキシ設定を使用するように~/.wgetrcファイルを構成しました)。しかし、

sudo yum repolist

「リポジトリepel/x86_64のメタリンクを取得できません。パスを確認して再試行してください」というエラーが表示されますが、

sudo yum --disablerepo=epel repolist

正常に動作します。

URLGRABBER_DEBUG=1 yum repolist

次の抜粋から、これはプロキシの問題であると考えられます。

2017-01-13 17:23:18,207 attempt 1/10: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64
2017-01-13 17:23:18,207 opening local file "/var/tmp/yum-usernameredacted-nARLQn/x86_64/7Server/epel/metalink.xml.tmp" with mode wb
* About to connect() to mirrors.fedoraproject.org port 443 (#10)
*   Trying 209.132.181.15...
* After 14938ms connect time, move on!
*   Trying 152.19.134.142...
* After 7468ms connect time, move on!
*   Trying 209.132.181.16...
* After 3734ms connect time, move on!
*   Trying 185.141.165.254...
* After 1866ms connect time, move on!
*   Trying 174.141.234.172...
* After 932ms connect time, move on!
*   Trying 152.19.134.198...
* After 466ms connect time, move on!
*   Trying 67.219.144.68...
* After 232ms connect time, move on!
*   Trying 8.43.85.67...
* After 116ms connect time, move on!
*   Trying 140.211.169.206...
* After 58ms connect time, move on!
*   Trying 140.211.169.196...
* After 28ms connect time, move on!
*   Trying 2604:1580:fe00:0:dead:beef:cafe:fed1...
* Failed to connect to 2604:1580:fe00:0:dead:beef:cafe:fed1: Network is unreachable
*   Trying 2610:28:3090:3001:dead:beef:cafe:fed3...
* Failed to connect to 2610:28:3090:3001:dead:beef:cafe:fed3: Network is unreachable
*   Trying 2605:bc80:3010:600:dead:beef:cafe:fed9...
* Failed to connect to 2605:bc80:3010:600:dead:beef:cafe:fed9: Network is unreachable
* Failed connect to mirrors.fedoraproject.org:443; Network is unreachable
* Closing connection 10
2017-01-13 17:23:48,178 exception: [Errno 14] curl#7 - "Failed to connect to 2604:1580:fe00:0:dead:beef:cafe:fed1: Network is unreachable"
2017-01-13 17:23:48,178 retrycode (14) not in list [-1, 2, 4, 5, 6, 7], re-raising

sudo 権限はありますが、ほとんどの yum 構成にアクセスできません。 妥当な解決策は何でしょうか?

答え1

yum接続するにはプロキシの詳細を提供する必要があるようです。

/etc/yum.conf次の行を追加する必要があります (有効なプロキシとログインの詳細で更新されます) 。

proxy=http://<your proxy address>:<proxy port>
proxy_username=<username>
proxy_password=<password>

これは明らかに有効なログイン認証情報が設定ファイルにプレーンテキストで保存されるため、セキュリティ上の懸念があります。誰でもその詳細を取得できるため、セキュリティ対策を必ず確認してください。

詳細はドキュメントをご覧くださいここ

これを追加できない場合、yum.conf唯一の現実的な選択肢は、追加できる人に連絡することです。それ以上のことをすると、プロキシとフォワーダーをさらに設定する必要があり、おそらくそれはできないでしょう。

関連情報