Notifications
Clear all

[Solved] How to install NodeJS on a GCP instance running RHEL 7

1 Posts
1 Users
1 Likes
214 Views
0
Topic starter

I'm exploring my abilities to build and launch a nodejs SPA in a Linux environment - i'm proficient in Linux programming, but need a little walkthrough in setting up a nodejs SPA.

Topic Tags
1 Answer
1
Topic starter

On your server, create a 'nodejs_install.shfile in your applications root directory and add the following bash script, save and run.

#!/bin/bash

##Update server
yum update \
-y

##Setup Nodejs repository
curl -sL  https://rpm.nodesource.com/setup_13.x  | sudo bash -

##Install NPM and Node.js 13.x
yum install nodejs \
-y


##Install Development Tools to build native addons
yum install gcc-c++ \
make


##Check Node.js and NPM version
node -v \
&& npm -v


##--End--

 

Hope this helps! 🙂

Share: