Fedora 36
Sponsored Link

初期設定 : モジュラーリポジトリを利用する2022/05/13

 
モジュラーリポジトリを利用する場合の基本操作です。
[1] 利用可能なモジュールのリストを表示します。
[root@dlp ~]#
dnf module list

Fedora Modular 36 - x86_64
Name               Stream           Profiles Summary
avocado            latest           default [d], minimal Framework with tools and libraries for Automated Testing
avocado-vt         latest           default  Avocado Virt Test Plugin
avocado-vt         82lts            default  Avocado Virt Test Plugin
cri-o              1.20             default [d] Kubernetes Container Runtime Interface for OCI-based containers

.....
.....

varnish            6.0              default  Varnish HTTP cache

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[2] 利用可能なモジュールをインストールするには以下のように設定します。
# 例として Node.js のモジュールリストを表示

[root@dlp ~]#
dnf module list nodejs

Fedora Modular 36 - x86_64
Name       Stream     Profiles                             Summary
nodejs     14         common [d], development, minimal     Javascript runtime
nodejs     16         common [d], development, minimal     Javascript runtime

Fedora Modular 36 - x86_64 - Updates
Name       Stream     Profiles                             Summary
nodejs     14         common [d], development, minimal     Javascript runtime
nodejs     16         common [d], development, minimal     Javascript runtime

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# Node.js 14 をインストール

[root@dlp ~]#
dnf module -y install nodejs:14

Last metadata expiration check: 0:09:29 ago on Fri 13 May 2022 09:11:35 AM JST.
Dependencies resolved.
================================================================================
 Package     Arch   Version                                Repository      Size
================================================================================
Installing group/module packages:
 nodejs      x86_64 1:14.19.0-3.module_f36+13930+82e25793  fedora-modular 200 k
 npm         x86_64 1:6.14.16-1.14.19.0.3.module_f36+13930+82e25793
                                                           fedora-modular 3.3 M
Installing dependencies:
 nodejs-libs x86_64 1:14.19.0-3.module_f36+13930+82e25793  fedora-modular  13 M
 openssl1.1  x86_64 1:1.1.1n-1.fc36                        fedora         1.5 M
Installing weak dependencies:
 nodejs-docs noarch 1:14.19.0-3.module_f36+13930+82e25793  fedora-modular 6.2 M
 nodejs-full-i18n
             x86_64 1:14.19.0-3.module_f36+13930+82e25793  fedora-modular 8.1 M
Installing module profiles:
 nodejs/common

Enabling module streams:
 nodejs             14

Transaction Summary
================================================================================
Install  6 Packages
.....
.....

# Node.js 14 が [e]nabled, [i]nstalled 状態となる

[root@dlp ~]#
dnf module list nodejs

Last metadata expiration check: 0:10:10 ago on Fri 13 May 2022 09:11:35 AM JST.
Fedora Modular 36 - x86_64
Name      Stream    Profiles                                Summary
nodejs    14 [e]    common [d] [i], development, minimal    Javascript runtime
nodejs    16        common [d], development, minimal        Javascript runtime

Fedora Modular 36 - x86_64 - Updates
Name      Stream    Profiles                                Summary
nodejs    14 [e]    common [d] [i], development, minimal    Javascript runtime
nodejs    16        common [d], development, minimal        Javascript runtime

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

[root@dlp ~]#
node -v

v14.19.0
# 他バージョンの Node.js に切り替えたい場合は一旦リセットする

[root@dlp ~]#
dnf module reset nodejs

# Node.js 16 を有効にしてインストール

[root@dlp ~]#
dnf module enable nodejs:16

[root@dlp ~]#
dnf module -y install nodejs:16/common
# Node.js 16 が [e]nabled 状態になる

[root@dlp ~]#
dnf module list nodejs

Last metadata expiration check: 0:11:29 ago on Fri 13 May 2022 09:11:35 AM JST.
Fedora Modular 36 - x86_64
Name      Stream    Profiles                                Summary
nodejs    14        common [d], development, minimal        Javascript runtime
nodejs    16 [e]    common [d] [i], development, minimal    Javascript runtime

Fedora Modular 36 - x86_64 - Updates
Name      Stream    Profiles                                Summary
nodejs    14        common [d], development, minimal        Javascript runtime
nodejs    16 [e]    common [d] [i], development, minimal    Javascript runtime

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

[root@dlp ~]#
node -v

v16.14.1
関連コンテンツ