

The output of the command shows the available modules and their status: Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta (RPMs) Node.js is one of the applications included in the Appstream repository, therefore to check the versions of this Javascript runtime available on RHEL 8, all we have to do is to use module, a subcommand of dnf, the distribution package manager. The main advantage of using this paradigm is that it’s possible to choose between different versions of the same application or utility.

The former contains the core packages needed by the operating system, while the latter hosts various types of software organized in modules. By default there are only two software sources enabled in the distribution: BaseOs and Appstream. $ – requires given linux commands to be executed as a regular non-privileged userĪs we saw in a previous article about install php on Rhel8, the version of Red Hat Enterprise Linux introduces a new way of organizing software in repositories. # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command Root privileges to install the needed packages The software needed to follow this tutorial is already included in a minimal installation of Rhel 8 Requirements, Conventions or Software Version Used The output above indicates that we have connected the NodeJS with MongoDB successfully.Software Requirements and Conventions Used Software Requirements and Linux Command Line Conventions Category

Install Sublime Text: var http = require(‘http’) Sudo apt-get install apt-transport-https echo "deb apt/stable/" | sudo tee /etc/apt//sublime-text.list To install sublime text editor on Ubuntu, run the commands below: wget -qO - | sudo apt-key add. For instance, I am using Sublime text editor for this guide. Create a file and name it “fosslinux.js” and input the code below in it: You can use your favorite text editor. Let us test the NodeJS application we recently installed by creating a test “Hello Foss” text. Therefore, to install it run the command below: sudo apt install npmĪfter installing npm, check its version by running the command-line below: npm -v If you found an output similar to mine, it means npm has not been installed on your Ubuntu OS. sudo apt-get install nodejsīe patient until the command above fully executes, then check if the command has been installed by running the command below: node -vĬheck the npm version by executing the command below: npm -v It contains an npm registry, an online DB for public and paid-for packages, and a command-line client referred to as npm.Īlso, if you don’t have the curl application installed on your Ubuntu OS, execute the command line below: sudo apt-get install curlĪfter successfully adding the NodeJS PPA to your system, proceed and execute the commands below to install NodeJS on Ubuntu. NPM is an abbreviation for Node Package Manager. Note: The apt-get command will install NPM alongside NodeJS.This is the default package manager for NodeJS.

To do so, run the commands below: sudo apt update Add the PPA to our Ubuntu system using the command lines below: sudo apt-get install curl python-software-propertiesĪlternatively, you can use the apt-get command and see if it works out for you. However, for the sake of this tutorial guide, we shall be using the stable (LTS) release. It is the developer’s choice to select which version of NodeJS to install. As earlier stated, the NodeJS application is available in several formats, such as the LTS and Current release. NodeJS can be easily installed on Ubuntu by adding the PPA provided by the NodeJS official website. Therefore, we shall be using the latest stable release for this guide. Note: MongoDB supports all NodeJS stable versions.
