(Last Updated On: December 6, 2018)

Welcome to our guide on how to install Node.js 10 LTS on RHEL 8. Node.js is a popular free and open source server-side programming language which runs on various platforms (Linux, Windows, Unix, MacOS). The Node 10 LTS codenamed “Dubnium“.  will remain supported until April 2020.

You can also learn about RHEL 8 new features from my previous article Red Hat Enterprise Linux 8 (RHEL 8) New Features & Review.

Installing Node.js 10 LTS on RHEL 8

Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine for easily building fast, scalable network applications. To install Node.js 10.x LTS on RHEL 8, use AppStream repository. RHEL 8 distributes both Node.js 8 and 10.

See available Node versions on RHEL 8:

$ sudo yum module list | grep nodejs
nodejs 10 [d] development, minimal, s2i, default [d] Javascript runtime 
nodejs 8 development, minimal, s2i, default [d] Javascript runtime

The default version installed is Nodejs 10 but you can explicitly specify the version of Node.js to install.

sudo yum module install nodejs:10

When prompted for a y/n confirmation, press y.

Transaction Summary
=======================================================================================================================================================
Install  3 Packages

Total download size: 12 M
Installed size: 56 M
Is this ok [y/N]: y

Wait for the installation to finish then check the version:

$ node --version
v10.11.0

If you’re interested in installing Node.js v8 instead, install it like below

sudo yum module install nodejs:8

Full package details can be viewed using the rpm command.

$ rpm -qi nodejs
Name        : nodejs
Epoch       : 1
Version     : 10.11.0
Release     : 2.el8+2021+27085a9b
Architecture: x86_64
Install Date: Thu 06 Dec 2018 01:02:58 AM EST
Group       : Development/Languages
Size        : 43977709
License     : MIT and ASL 2.0 and ISC and BSD
Signature   : RSA/SHA256, Thu 18 Oct 2018 03:14:29 AM EDT, Key ID 938a80caf21541eb
Source RPM  : nodejs-10.11.0-2.el8+2021+27085a9b.src.rpm
Build Date  : Thu 11 Oct 2018 11:03:49 AM EDT
Build Host  : x86-vm-10.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://nodejs.org/
Summary     : JavaScript runtime
Description :
Node.js is a platform built on Chrome's JavaScript runtime
for easily building fast, scalable network applications.
Node.js uses an event-driven, non-blocking I/O model that
makes it lightweight and efficient, perfect for data-intensive
real-time applications that run across distributed devices.

You may also need to install Development Tools for building Node software.

sudo yum install -y gcc-c++ make

You now have Node.js 10 installed on your RHEl 8 server. Also read

How to Install MySQL 8.0 on RHEL 8

How to Install PHP 7.2 ,7.1 on RHEL 8

How to Install MariaDB Database Server on RHEL 8

How to Install Python 3 / Python 2.7 on RHEL 8