How to install Node.js on AlmaLinux 8
Publisher: Psychz Networks, July 21,2021You will require Node.js if you are developing websites or applications in JavaScript. It is a JavaScript platform that lets you execute the code on the server instead of the client's browser.
In the following tutorial, we will show you how to install Node.js on AlmaLinux 8. You must have basic knowledge of using the shell and require a root account or add 'sudo' to the commands to get root privileges.
Step 1: Update your System
Run the following two commands to update your system. The following commands will download any latest patch in case missing or install the latest packages.
# dnf update
# dnf install epel-release
Step 2: List available versions
Modules are available for all editions from Fedora 29, and on the Server Edition from Fedora 28. To list all available versions, run:
# dnf module list nodejs
Output
AlmaLinux 8 - AppStream
Name Stream Profiles Summary
nodejs 10 [d] common [d], development, minimal, s2i Javascript runtime
nodejs 12 common [d], development, minimal, s2i Javascript runtime
nodejs 14 common [d], development, minimal, s2i Javascript runtime
Extra Packages for Enterprise Linux Modular 8 - x86_64
Name Stream Profiles Summary
nodejs 13 default, development, minimal Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Step 3: Install Node.js
With the above list, you can choose which version you would like to install and use the following command to install the desired Node.js.
# dnf module install nodejs:14
Output
Dependencies resolved.
===========================================================================================
Package
Arch Version
Repo Size
===========================================================================================
Installing group/module packages:
nodejs
x86_64 1:14.16.0-2.module_el8.3.0+2049+b92e1eb6 appstream 11 M
npm
x86_64 1:6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb6 appstream 3.7 M
Installing weak dependencies:
nodejs-docs
noarch 1:14.16.0-2.module_el8.3.0+2049+b92e1eb6 appstream 7.9 M
nodejs-full-i18n
x86_64 1:14.16.0-2.module_el8.3.0+2049+b92e1eb6 appstream 7.5 M
Installing module profiles:
nodejs/common
Enabling module streams:
nodejs 14
Transaction Summary
===========================================================================================
Install 4 Packages
Total download size: 30 M
Installed size: 138 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): nodejs-full-i18n-14.16.0-2.module_el8.3.0+2049+b92e 3.4 MB/s | 7.5 MB 00:02
(2/4): nodejs-docs-14.16.0-2.module_el8.3.0+2049+b92e1eb6. 3.5 MB/s | 7.9 MB 00:02
(3/4): nodejs-14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_6 4.1 MB/s | 11 MB
00:02
(4/4): npm-6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb 6.6 MB/s | 3.7 MB 00:00
-------------------------------------------------------------------------------------------
Total
10 MB/s | 30 MB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: npm-1:6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb6.x86_64 1/1
Preparing :
1/1
Installing : nodejs-docs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.noarch 1/4
Installing : nodejs-full-i18n-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_6 2/4
Installing : npm-1:6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb6.x86_64 3/4
Installing : nodejs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_64 4/4
Running scriptlet: nodejs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_64 4/4
Verifying : nodejs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_64 1/4
Verifying : nodejs-docs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.noarch 2/4
Verifying : nodejs-full-i18n-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_6 3/4
Verifying : npm-1:6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb6.x86_64 4/4
Installed:
nodejs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_64
nodejs-docs-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.noarch
nodejs-full-i18n-1:14.16.0-2.module_el8.3.0+2049+b92e1eb6.x86_64
npm-1:6.14.11-1.14.16.0.2.module_el8.3.0+2049+b92e1eb6.x86_64
Complete!
Step 4: Verify installed version
Once successfully installed, you can verify your version of Node.js installed
# node -v
Output
Thank you for referring to this tutorial to install Node.js on your AlmaLinux 8 System. We hope that you were able to install it on your system successfully.
Please like this page to show your appreciation.