LoginSignup
1
1

AlmaLinuxのリポジトリ

Last updated at Posted at 2024-05-28

almalinuxのリポジトリについて少し調べます。

リポジトリって?

Windowsでソフトウェアをインストールする場合、そのやり方はいろいろな方法がありますが、窓の社やVectorなどの信頼のおける配布サイトからダウンロードしてインストールするという方法があります。
Linuxでもソフトウェアをまとめて管理・配布している場所からダウンロードしてインストールする形態をとっています。

※もちろんそれ以外の方法、(本家配布ページからダウンロードしてインストールしたり、ソースコードからビルド自分でビルドするなど)もあります。

この、ソフトウェアをまとめて管理・配布している場所をリポジトリといいます。

リポジトリはLinuxのディストリビューション・種類ごとに複数のものが用意されていて、大きく

  • 公式リポジトリ
  • コミュニティリポジトリ
  • サードパーティリポジトリ

の3種類があります。

Linuxを触りはじめて調べたら出てくる、epelリポジトリはコミュニティリポジトリ、remi's rpmリポジトリはサードパーティリポジトリです。

AlmaLinuxでは以下のような公式リポジトリがあります。

リポジトリを見てみる

実際に指を動かしてリポジトリを少し調べて見てみましょう。

現在有効なリポジトリを表示

# dnf repolist
repo id          repo name
appstream        AlmaLinux 9 - AppStream
baseos           AlmaLinux 9 - BaseOS 
extras           AlmaLinux 9 - Extras

これらは標準で有効になっているリポジトリです。dnf installなどを行うとこのリポジトリを探しに行きます。

登録されているすべてのリポジトリを表示

# dnf repolist all
repo id                       repo name                                  status
appstream                     AlmaLinux 9 - AppStream                    enabled
appstream-debuginfo           AlmaLinux 9 - AppStream - Debug            disabled
appstream-source              AlmaLinux 9 - AppStream - Source           disabled
baseos                        AlmaLinux 9 - BaseOS                       enabled
baseos-debuginfo              AlmaLinux 9 - BaseOS - Debug               disabled
baseos-source                 AlmaLinux 9 - BaseOS - Source              disabled
crb                           AlmaLinux 9 - CRB                          disabled
crb-debuginfo                 AlmaLinux 9 - CRB - Debug                  disabled
crb-source                    AlmaLinux 9 - CRB - Source                 disabled
extras                        AlmaLinux 9 - Extras                       enabled
extras-debuginfo              AlmaLinux 9 - Extras - Debug               disabled
extras-source                 AlmaLinux 9 - Extras - Source              disabled
highavailability              AlmaLinux 9 - HighAvailability             disabled
highavailability-debuginfo    AlmaLinux 9 - HighAvailability - Debug     disabled
highavailability-source       AlmaLinux 9 - HighAvailability - Source    disabled
nfv                           AlmaLinux 9 - NFV                          disabled
nfv-debuginfo                 AlmaLinux 9 - NFV - Debug                  disabled
nfv-source                    AlmaLinux 9 - NFV - Source                 disabled
plus                          AlmaLinux 9 - Plus                         disabled
plus-debuginfo                AlmaLinux 9 - Plus - Debug                 disabled
plus-source                   AlmaLinux 9 - Plus - Source                disabled
resilientstorage              AlmaLinux 9 - ResilientStorage             disabled
resilientstorage-debuginfo    AlmaLinux 9 - ResilientStorage - Debug     disabled
resilientstorage-source       AlmaLinux 9 - ResilientStorage - Source    disabled
rt                            AlmaLinux 9 - RT                           disabled
rt-debuginfo                  AlmaLinux 9 - RT - Debug                   disabled
rt-source                     AlmaLinux 9 - RT - Source                  disabled
sap                           AlmaLinux 9 - SAP                          disabled
sap-debuginfo                 AlmaLinux 9 - SAP - Debug                  disabled
sap-source                    AlmaLinux 9 - SAP - Source                 disabled
saphana                       AlmaLinux 9 - SAPHANA                      disabled
saphana-debuginfo             AlmaLinux 9 - SAPHANA - Debug              disabled
saphana-source                AlmaLinux 9 - SAPHANA - Source             disabled

無効なリポジトリも含めて、すべてのリポジトリを表示します。実際は色付きで表示されるはずなのでもう少し見やすいです。

repoファイルの場所

# ls -la /etc/yum.repos.d/
total 52
drwxr-xr-x  2 root root 4096 May 27 23:47 .
drwxr-xr-x 63 root root 4096 May 27 23:48 ..
-rw-r--r--  1 root root 1023 May  1 20:51 almalinux-appstream.repo
-rw-r--r--  1 root root  987 May  1 20:51 almalinux-baseos.repo
-rw-r--r--  1 root root  951 May  1 20:51 almalinux-crb.repo
-rw-r--r--  1 root root  987 May  1 20:51 almalinux-extras.repo
-rw-r--r--  1 root root 1107 May  1 20:51 almalinux-highavailability.repo
-rw-r--r--  1 root root  951 May  1 20:51 almalinux-nfv.repo
-rw-r--r--  1 root root  963 May  1 20:51 almalinux-plus.repo
-rw-r--r--  1 root root 1107 May  1 20:51 almalinux-resilientstorage.repo
-rw-r--r--  1 root root  939 May  1 20:51 almalinux-rt.repo
-rw-r--r--  1 root root  999 May  1 20:51 almalinux-saphana.repo
-rw-r--r--  1 root root  951 May  1 20:51 almalinux-sap.repo

リポジトリの設定情報はrepoファイルに記載されています。repoファイルは/etc/yum.repos.d/ディレクトリに存在しています。

repoファイルの中身

# cat  /etc/yum.repos.d/almalinux-baseos.repo
[baseos]
name=AlmaLinux $releasever - BaseOS
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos
# baseurl=https://repo.almalinux.org/almalinux/$releasever/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
metadata_expire=86400
enabled_metadata=1

[baseos-debuginfo]
name=AlmaLinux $releasever - BaseOS - Debug
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-debug
# baseurl=https://repo.almalinux.org/vault/$releasever/BaseOS/debug/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
metadata_expire=86400
enabled_metadata=0

[baseos-source]
name=AlmaLinux $releasever - BaseOS - Source
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-source
# baseurl=https://repo.almalinux.org/vault/$releasever/BaseOS/Source/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
metadata_expire=86400
enabled_metadata=0

有効なリポジトリの情報表示

repoファイルに書いてあるURLは変数表示になっているので、同様の情報を見れるdnf repolistを実行してみます。

# dnf repoinfo
Last metadata expiration check: 2:08:20 ago on Mon 27 May 2024 10:09:46 PM UTC.
Repo-id            : appstream
Repo-name          : AlmaLinux 9 - AppStream
Repo-revision      : 1716562117
Repo-updated       : Fri 24 May 2024 02:48:36 PM UTC
Repo-pkgs          : 6,105
Repo-available-pkgs: 5,838
Repo-size          : 8.8 G
Repo-mirrors       : https://mirrors.almalinux.org/mirrorlist/9/appstream
Repo-baseurl       : http://ftp.sakura.ad.jp/almalinux/9.4/AppStream/x86_64/os/ (9 more)
Repo-expire        : 86,400 second(s) (last: Mon 27 May 2024 10:09:44 PM UTC)
Repo-filename      : /etc/yum.repos.d/almalinux-appstream.repo

Repo-id            : baseos
Repo-name          : AlmaLinux 9 - BaseOS
Repo-revision      : 1716562140
Repo-updated       : Fri 24 May 2024 02:49:00 PM UTC
Repo-pkgs          : 1,180
Repo-available-pkgs: 1,180
Repo-size          : 1.8 G
Repo-mirrors       : https://mirrors.almalinux.org/mirrorlist/9/baseos
Repo-baseurl       : http://ftp.sakura.ad.jp/almalinux/9.4/BaseOS/x86_64/os/ (9 more)
Repo-expire        : 86,400 second(s) (last: Mon 27 May 2024 10:09:45 PM UTC)
Repo-filename      : /etc/yum.repos.d/almalinux-baseos.repo

Repo-id            : extras
Repo-name          : AlmaLinux 9 - Extras
Repo-revision      : 1716562154
Repo-updated       : Fri 24 May 2024 02:49:14 PM UTC
Repo-pkgs          : 29
Repo-available-pkgs: 29
Repo-size          : 294 k
Repo-mirrors       : https://mirrors.almalinux.org/mirrorlist/9/extras
Repo-baseurl       : http://ftp.sakura.ad.jp/almalinux/9.4/extras/x86_64/os/ (9 more)
Repo-expire        : 86,400 second(s) (last: Mon 27 May 2024 10:09:46 PM UTC)
Repo-filename      : /etc/yum.repos.d/almalinux-extras.repo
Total packages: 7,314

試しにbaseosリポジトリのRepo-baseurlを開いてみると、Index表示でパッケージファイルなどが表示されます。これらがリポジトリの実体です。

dnf repository-packages baseos listを実行してみると一致していることがわかります。

# dnf repository-packages baseos list
Last metadata expiration check: 2:21:26 ago on Mon 27 May 2024 10:09:46 PM UTC.
Installed Packages
NetworkManager.x86_64           1:1.46.0-4.el9_4       @baseos
NetworkManager-libnm.x86_64     1:1.46.0-4.el9_4       @baseos
acl.x86_64                      2.3.1-4.el9            @baseos
almalinux-gpg-keys.x86_64       9.4-1.el9              @baseos
almalinux-release.x86_64        9.4-1.el9              @baseos
以下略

おわり

より理解を深めたい場合は以下のドキュメントを参照するとよいかもしれません。

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