Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install NodeJS 14 / 16 & NPM on Rocky Linux 8 - DesignLinux

Jul 26 2021
designlinux 0 Comments

Built on Chrome’s V8 engine, Node.JS is open-source, and event-driven Javascript runtime that is designed to build scalable applications and backend APIs. NodeJS is lightweight and efficient, thanks to its non-blocking I/O model and event-driven architecture. This makes it a perfect choice for handling data-intensive real-time applications. It is cross-platform and totally free to download and use.

NPM is an acronym for Node Package Manager, which is the default package manager for Node.JS and the richest repository for Node.JS packages.

[ You might also like: 3 Top Node.js Package Managers for Linux ]

In this article, we focus on how to install NodeJS & NPM on Rocky Linux 8.

There are two main ways of installing NodeJS on Rocky Linux 8.

  1. Installing from the default Rocky Linux AppStream repository.
  2. Installing from Node.JS binary distributions supported by Nodesource.

Let’s have a look at each of these methods.

Install Node.JS from Rocky Linux AppStream Repositories

Rocky Linux AppStream repositories provide Node.JS as a module called nodejs. Therefore, there’s no need to add or enable any third-party repositories. The downside is that the versions provided are not up to date, but will nonetheless get the job done.

To check out the available versions provided, run the command:

$ sudo dnf module list nodejs

From the output, the latest stream is NodeJS 14. However, the default module stream is nodejs 10.

Check NodeJS Versions
Check NodeJS Versions

To enable the latest NodeJS stream, run the command:

$ sudo dnf module install nodejs:14
Enable NodeJS Stream
Enable NodeJS Stream

Then install NodeJS using the DNF package manager as shown.

$ sudo dnf install nodejs
Install NodeJS in Rocky Linux
Install NodeJS in Rocky Linux

Once installed, verify the version of Node.JS installed as follows.

$ node -v
OR
$ node ---version

v14.16.0

To check the version of NPM, run:

$ npm -v
OR
$ npm ---version

Install Node.JS from Nodesource Repositories

The second option is to install Node.JS from the Node.JS binary package which is provided by nodesource. This provides the latest version of Node.JS which, at the time of writing this guide, is Node.JS v16.5.

So, grab the setup script and run it as shown using curl command.

$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
Download NodeJS Installer
Download NodeJS Installer

Then install Node.JS.

$ sudo dnf install nodejs
Install NodeJS from Nodesource
Install NodeJS from Nodesource

Once again, verify the installation of Node.JS as shown.

$ node -v
OR
$ node ---version

v16.5.0

And NPM as well.

$ npm -v

7.19.1
Conclusion

In this tutorial, we have highlighted two ways of installing Node.JS & NPM on Rocky Linux – installation from Rocky Linux repositories and from the Nodesource repository. We do hope that this guide was helpful and that you can now proceed with creating your applications.

Related

Tags: Rocky Linux Tips

How to Install PHP 7.4 on Rocky Linux 8

Prev Post

How to Install LAMP Stack on Rocky Linux 8

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 623
  • 1,055,395

DesignLinux.com © All rights reserved

Go to mobile version