Setup NodeJS and NPM – CentOS/Fedora/Red Hat

Exported on 22-Sep-2021 14:54:12

Configure NodeJS Development Environment On RHEL Based Server With AttuneOps

This Blueprint Installs NodeJS Development Environment On CentOS, Fedora and Red Hat

Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.

Attune makes it easy to configure Node.js and its popular dependency manager NPM with a few clicks.

Pre-Blueprint Attune setup
  1. On the Inputs tab, create a Linux node for the host you wish to install the stack on.
  2. On the Inputs tab, create Linux credentials to connect to the host you wish to install the stack on.

Parameters

Name Type Script Reference Default Value Comment
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

1 - Update yum packages

Update yum packages.

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
# Install APT update
sudo yum -y update

2 - Install Node and NPM

Installs NodeJS v16 and Node Package Manager.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
# Download setup script
sudo curl -fsSL https://rpm.nodesource.com/setup_16.x -o nodesource.sh

# Configure install script
sudo bash nodesource.sh

# Start installation 
sudo yum install -y nodejs