LoginSignup
0
0

More than 3 years have passed since last update.

Amazon Linux2でrpm --importで外部repository追加できない俺のためのメモ

Last updated at Posted at 2021-01-07

俺です

Metricbeatを突っ込もうとした時に字を読め問題に遭遇したのでメモを残します。

[ec2-user@ip-172-31-28-80 ~]$ cat /etc/system-release
Amazon Linux release 2 (Karoo)
[ec2-user@ip-172-31-28-80 ~]$ rpm -qa|grep relea
system-release-2-13.amzn2.x86_64

rpm --import

nai

[root@ip-172-31-28-80 docker]# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
[root@ip-172-31-28-80 docker]# cd /etc/yum.repos.d/
[root@ip-172-31-28-80 yum.repos.d]# ll
合計 8
-rw-r--r-- 1 root root 1003 12月  8 00:40 amzn2-core.repo
-rw-r--r-- 1 root root 1105 12月 21 20:04 amzn2-extras.repo

yum-config-manager

dekita

[root@ip-172-31-28-80 yum.repos.d]# yum-config-manager --add-repo https://artifacts.elastic.co/GPG-KEY-elasticsearch
読み込んだプラグイン:extras_suggestions, langpacks, priorities, update-motd
adding repo from: https://artifacts.elastic.co/GPG-KEY-elasticsearch

[artifacts.elastic.co_GPG-KEY-elasticsearch]
name=added from: https://artifacts.elastic.co/GPG-KEY-elasticsearch
baseurl=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1


[root@ip-172-31-28-80 yum.repos.d]# echo $?
0
[root@ip-172-31-28-80 yum.repos.d]# ll
合計 12
-rw-r--r-- 1 root root 1003 12月  8 00:40 amzn2-core.repo
-rw-r--r-- 1 root root 1105 12月 21 20:04 amzn2-extras.repo
-rw-r--r-- 1 root root  184  1月  7 07:55 artifacts.elastic.co_GPG-KEY-elasticsearch.repo
[root@ip-172-31-28-80 yum.repos.d]# yum install metricbeat
読み込んだプラグイン:extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                         | 3.7 kB  00:00:00
amzn2extra-docker                                                                                                                  | 3.0 kB  00:00:00
artifacts.elastic.co_GPG-KEY-elasticsearch                                                                                         | 1.3 kB  00:00:00
artifacts.elastic.co_GPG-KEY-elasticsearch/primary                                                                                 | 164 kB  00:00:00
artifacts.elastic.co_GPG-KEY-elasticsearch                                                                                                        544/544
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ metricbeat.x86_64 0:7.10.1-1 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

==========================================================================================================================================================
 Package                       アーキテクチャー          バージョン                   リポジトリー                                                   容量
==========================================================================================================================================================
インストール中:
 metricbeat                    x86_64                    7.10.1-1                     artifacts.elastic.co_GPG-KEY-elasticsearch                     27 M

トランザクションの要約
==========================================================================================================================================================
インストール  1 パッケージ

総ダウンロード容量: 27 M
インストール容量: 93 M
Is this ok [y/d/N]: y
Downloading packages:
metricbeat-oss-7.10.1-x86_64.rpm                                                                                                   |  27 MB  00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : metricbeat-7.10.1-1.x86_64                                                                                                1/1
  検証中                  : metricbeat-7.10.1-1.x86_64                                                                                                1/1

インストール:
  metricbeat.x86_64 0:7.10.1-1

完了しました!
[root@ip-172-31-28-80 yum.repos.d]# rpm -qa|grep metricbeat
metricbeat-7.10.1-1.x86_64
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