0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS yumでハマった Could not retrieve mirrorlist

Last updated at Posted at 2021-10-30

AWSでyumでapacheを入れようとしてハマったメモです。
おそらく物凄いレベルの低い記事。(インフラ周り苦手。。)

#1.環境

InternetGateway → VPC → publicサブネット → EC2(linux)

ネットワークACLルール
image.png

#2.エラー内容

ルートになってからyumでinstall

[ec2-user@ip- ~]$ sudo -i
[root@ip- ~]# whoami
root
[root@ip- ~]# yum install httpd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd

Could not retrieve mirrorlist https://amazonlinux-2-repos-us-east-2.s3.us-east-2.amazonaws.com/2/core/latest/x86_64/mirror.list error was
12: Timeout on https://amazonlinux-2-repos-us-east-2.s3.us-east-2.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Connection timed out after 5000 milliseconds')

#3.原因
アウトバウンドは開けてるのにな。。
インバウンド関係あるのかな?
って思って全部開けてみたら通りました。

#4.対処法
image.png

[root@ip- ~]# yum install httpd
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
amzn2extra-docker                                        | 3.0 kB     00:00
(1/5): amzn2-core/2/x86_64/group_gz                        | 2.5 kB   00:00

~略~
Installed:
  httpd.x86_64 0:2.4.51-1.amzn2

Dependency Installed:
  apr.x86_64 0:1.7.0-9.amzn2
  apr-util.x86_64 0:1.6.1-5.amzn2.0.2
  apr-util-bdb.x86_64 0:1.6.1-5.amzn2.0.2
  generic-logos-httpd.noarch 0:18.0.0-4.amzn2
  httpd-filesystem.noarch 0:2.4.51-1.amzn2
  httpd-tools.x86_64 0:2.4.51-1.amzn2
  mailcap.noarch 0:2.1.41-2.amzn2
  mod_http2.x86_64 0:1.15.19-1.amzn2.0.1

Complete!

何番が必要だったんだろ。。
全部開けっ放しもイマイチですねー。

#5.おまけ

アパッチ立ち上げて稼働確認

[root@ip- ~]# systemctl start httpd
[root@ip- ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2021-10-30 01:51:21 UTC; 14s ago

image.png

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?