Install and Setup NodeJS and NPM on Ubuntu/Debian

Exported on 22-Sep-2021 14:57:40

Configure NodeJS Development Environment On Debian Based Server With AttuneOps

This Blueprint Installs NodeJS Development Environment On Debian and Ubuntu

Node.js - the server-side JavaScript programming environment that uses an event-driven, non-blocking I/O model allowing users to build fast and scalable data-intensive applications that run in real time.

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 - Refresh APT Repositories

Update apt repostories.

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 npm
sudo apt -y  update

2 - Install NPM

Installs 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
# Install npm
sudo apt -y install npm

3 - Install Node

Install NodeJS v16.x

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
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -

# Start installation 
sudo apt-get install -y nodejs