Fedora 35
Sponsored Link

初期設定 : モジュラーリポジトリを利用する2021/11/04

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

Fedora Modular 34 - x86_64
Name               Stream           Profiles Summary
avocado            latest           default [d], minimal  Framework with tools and libraries for Automated Testing
avocado            82lts            default,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              nightly          default  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 35 - x86_64
Name       Stream     Profiles                             Summary
nodejs     12         default [d], development, minimal    Javascript runtime
nodejs     14         default, development, minimal        Javascript runtime
nodejs     15         default, development, minimal        Javascript runtime
nodejs     16         default, development, minimal        Javascript runtime

Fedora Modular 35 - x86_64 - Updates
Name       Stream     Profiles                             Summary
nodejs     12         default [d], development, minimal    Javascript runtime
nodejs     14         default, development, minimal        Javascript runtime
nodejs     15         default, development, minimal        Javascript runtime
nodejs     16         default, development, minimal        Javascript runtime

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

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

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

Dependencies resolved.
==================================================================================================
 Package            Arch    Version                                         Repository        Size
==================================================================================================
Installing group/module packages:
 nodejs             x86_64  1:12.22.7-1.module_f35+13211+80e67b81           updates-modular   94 k
 npm                x86_64  1:6.14.15-1.12.22.7.1.module_f35+13211+80e67b81 updates-modular  3.3 M
Installing dependencies:
 nodejs-libs        x86_64  1:12.22.7-1.module_f35+13211+80e67b81           updates-modular   12 M
Installing weak dependencies:
 nodejs-docs        noarch  1:12.22.7-1.module_f35+13211+80e67b81           updates-modular  3.0 M
 nodejs-full-i18n   x86_64  1:12.22.7-1.module_f35+13211+80e67b81           updates-modular  7.7 M
Installing module profiles:
 nodejs/default
Enabling module streams:
 nodejs                     12

Transaction Summary
==================================================================================================
Install  5 Packages
.....
.....

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

[root@dlp ~]#
dnf module list nodejs

Fedora Modular 35 - x86_64
Name      Stream    Profiles                                Summary
nodejs    12 [e]    default [d] [i], development, minimal   Javascript runtime
nodejs    14        default, development, minimal           Javascript runtime
nodejs    15        default, development, minimal           Javascript runtime
nodejs    16        default, development, minimal           Javascript runtime

Fedora Modular 35 - x86_64 - Updates
Name      Stream    Profiles                                Summary
nodejs    12 [e]    default [d] [i], development, minimal   Javascript runtime
nodejs    14        default, development, minimal           Javascript runtime
nodejs    15        default, development, minimal           Javascript runtime
nodejs    16        default, development, minimal           Javascript runtime

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

[root@dlp ~]#
node -v

v12.22.7
# 他バージョンの 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/default
# Node.js 16 が [e]nabled 状態になる

[root@dlp ~]#
dnf module list nodejs

Fedora Modular 35 - x86_64
Name       Stream     Profiles                             Summary
nodejs     12         default [d], development, minimal    Javascript runtime
nodejs     14         default, development, minimal        Javascript runtime
nodejs     15         default, development, minimal        Javascript runtime
nodejs     16 [e]     default [i], development, minimal    Javascript runtime

Fedora Modular 35 - x86_64 - Updates
Name       Stream     Profiles                             Summary
nodejs     12         default [d], development, minimal    Javascript runtime
nodejs     14         default, development, minimal        Javascript runtime
nodejs     15         default, development, minimal        Javascript runtime
nodejs     16 [e]     default [i], development, minimal    Javascript runtime

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

[root@dlp ~]#
node -v

v16.11.1
関連コンテンツ