Setup NodeJS and NPM – Ubuntu

Exported on 26-Aug-2021 14:12:09

This installs NodeJS and NPM on the target machine

Parameters

Name Type Script Reference Default Value Comment
s1 Linux / Unix Server s1
s1c Linux OS Credential s1c

1 - Refresh APT Repositories

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