質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
yum

yumコマンドは、UNIX系OSのRPMパッケージのインストールなどを行うためのプログラムのことです。

Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

3479閲覧

EC2のインスタンスでyumコマンドを使いたい

sausagefish

総合スコア1

yum

yumコマンドは、UNIX系OSのRPMパッケージのインストールなどを行うためのプログラムのことです。

Amazon EC2

Amazon EC2は“Amazon Elastic Compute Cloud”の略称です。Amazon Web Services(AWS)の一部であり、仮想化されたWebサーバーのコンピュータリソースをレンタルできるサービスです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2021/12/14 11:22

前提・実現したいこと

EC2のインスタンスにTeraTermを使用してSSH接続はできるのですが、以前まで使えていたyumコマンドが使えなくなり以下のエラーメッセージが出るようになってしまいました。

発生している問題・エラーメッセージ

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Could not retrieve mirrorlist https://amazonlinux-2-repos-ap-northeast-1.s3.dualstack.ap-northeast-1.amazonaws.com/2/core/latest/x86_64/mirror.list error was 12: Timeout on https://amazonlinux-2-repos-ap-northeast-1.s3.dualstack.ap-northeast-1.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Failed to connect to amazonlinux-2-repos-ap-northeast-1.s3.dualstack.ap-northeast-1.amazonaws.com port 443: Connection timed out') One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: amzn2-core/2/x86_64

試したこと

~セキュリティグループ~
以下のHTTPSのインバウンドルールを追加(セキュリティグループには既にSSHとHTTPは0.0.0.0/0,::/0で設定されています)
HTTPS 43 0.0.0.0/0
HTTPS 43 ::/0
アウトバウンドルールにも同様にHTTPとHTTPSをそれぞれ0.0.0.0/0と::0で設定しました。

~ネットワークACL~
インバウンドルールはルール番号100でSSHのみ設定
アウトバウンドルールはすべてのトラフィックスのみであったため、HTTPとHTTPSをそれぞれ0.0.0.0/0と::/0で追加しました。

~エンドポイント~
エンドポイントを新たに作成し、ポリシーはフルアクセスとしています。

以上のことを追加設定し、再度「sudo yum update」してみましたが、同じエラーが出されるのみでした。

補足情報(FW/ツールのバージョンなど)

インスタンスは無料利用枠で作成しております。
インスタンスタイプ t2.micro

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

ネットワークACLを制限するのであれば、Inboundに一時ポートの許可を入れる必要があるかと思います。
下記の140番のような設定ですね。
https://docs.aws.amazon.com/ja_jp/vpc/latest/userguide/vpc-network-acls.html#custom-network-acl

投稿2021/12/14 13:05

lifull_shimamut

総合スコア9

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問