Saturday, July 23, 2022

[SOLVED] How to install nodejs on redhat without internet and without root permission?

Issue

What is the best way that Node.js can be installed on linux without internet nor root permissions. So far I just downloaded the source tar.gz and tar.xz files.


Solution

To install nodejs on linux without root permission and offline

Download the tar.xz from Linux Binaries(x64) @ https://nodejs.org/en/download/

Then in ~.bashrc add:

NODE_HOME=~/apps/node-v12.18.3-linux-x64
PATH=$NODE_HOME/bin:$PATH

Source the bashrc file or restart terminal and you are done

source .bashrc

Try

node --version
npm -v


Answered By - Youssef Mohamed
Answer Checked By - Clifford M. (WPSolving Volunteer)