Initial Settings
Below are how to use the Moduler Repository of CentOS Stream 9.
Step [1] Display available modules.
[root@bizantum ~]# dnf module list
CentOS Stream 9 - AppStream
Name Stream Profiles Summary
maven 3.8 common [d] Java project management and project com
prehension tool
nginx 1.22 common [d] nginx webserver
.....
.....
postgresql 15 client, server [d] PostgreSQL server and client module
redis 7 common [d] Redis persistent key-value database
ruby 3.1 common [d] An interpreter of object-oriented scrip
ting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Step [2] For installing available modules, Configure like follows.
# for example, display [Node.js] modules
[root@bizantum ~]# dnf module list nodejs
CentOS Stream 9 - AppStream
Name Stream Profiles Summary
nodejs 18 common [d], development, minimal, s2i Javascript runtime
nodejs 20 common [d], development, minimal, s2i Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
# install Node.js 18
[root@bizantum ~]# dnf module -y install nodejs:18
Dependencies resolved.
========================================================================================
Package Arch Version Repo Size
========================================================================================
Installing group/module packages:
nodejs x86_64 1:18.14.2-2.module_el9+307+7e5e4074 appstream 12 M
npm x86_64 1:9.5.0-1.18.14.2.2.module_el9+307+7e5e4074 appstream 2.5 M
Installing weak dependencies:
nodejs-docs noarch 1:18.14.2-2.module_el9+307+7e5e4074 appstream 7.6 M
nodejs-full-i18n x86_64 1:18.14.2-2.module_el9+307+7e5e4074 appstream 8.4 M
Installing module profiles:
nodejs/common
Enabling module streams:
nodejs 18
Transaction Summary
========================================================================================
Install 4 Packages
.....
.....
# state of [Node.js 18] turns to [e]nabled and [i]nstalled
[root@bizantum ~]# dnf module list nodejs
CentOS Stream 9 - AppStream
Name Stream Profiles Summary
nodejs 18 [e] common [d] [i], development, minimal, s2i Javascript runtime
nodejs 20 common [d], development, minimal, s2i Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@bizantum ~]# node -v
v18.14.2
Step [3] If you would like to change to another version of installed module, Configure like follows. For example, Switch to Node.js 20 from Node.js 18 that was installed on Step [2] above.
[root@bizantum ~]# dnf module list nodejs
CentOS Stream 9 - AppStream
Name Stream Profiles Summary
nodejs 18 [e] common [d] [i], development, minimal, s2i Javascript runtime
nodejs 20 common [d], development, minimal, s2i Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
# reset first to switch
[root@bizantum ~]# dnf module -y reset nodejs
# install Node.js 20
[root@bizantum ~]# dnf module -y install nodejs:20
Dependencies resolved.
=======================================================================================
Package Arch Version Repo Size
=======================================================================================
Upgrading:
nodejs x86_64 1:20.5.1-1.module_el9+642+c81e94f6 appstream 14 M
nodejs-docs noarch 1:20.5.1-1.module_el9+642+c81e94f6 appstream 8.0 M
nodejs-full-i18n x86_64 1:20.5.1-1.module_el9+642+c81e94f6 appstream 8.5 M
npm x86_64 1:9.8.0-1.20.5.1.1.module_el9+642+c81e94f6 appstream 2.6 M
Installing module profiles:
nodejs/common
Enabling module streams:
nodejs 20
Transaction Summary
=======================================================================================
Upgrade 4 Packages
.....
.....
# state of [Node.js 20] turns to [e]nabled
[root@bizantum ~]# dnf module list nodejs
CentOS Stream 9 - AppStream
Name Stream Profiles Summary
nodejs 18 common [d], development, minimal, s2i Javascript runtime
nodejs 20 [e] common [d] [i], development, minimal, s2i Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@bizantum ~]# node -v
v20.5.1
Comments
Post a Comment
Thank you for your comment! We appreciate your feedback, feel free to check out more of our articles.
Best regards, Bizantum Blog Team.