Frequently Asked Question

How to install Node on a Linux server without accessing internet
Last Updated 3 months ago

Requirement


During the installation of N4V on a Linux server, an internet connexion may be necessary to install Node/nvm parts.

If the server has no internet access, you can authorize the following URLs to download manually the required files.

the URLS are : 

https://nodejs.org/dist/v20.20.2/node-v20.20.2-linux-x64.tar.gz

https://nodejs.org/dist/index.tab

https://nodejs.org/dist/latest-v20.x/SHASUMS256.txt

https://github.com/nvm-sh/nvm/archive/refs/tags/v0.40.1.tar.gz


Installation of the requirement

if you have already downloaded the files on a seperated server and transfered them you can skip this step

Download

mkdir ~/offline
cd ~/offline
curl -LO https://nodejs.org/dist/v20.20.2/node-v20.20.2-linux-x64.tar.gz
curl -LO https://nodejs.org/dist/index.tab
curl -LO https://nodejs.org/dist/latest-v20.x/SHASUMS256.txt
curl -LO https://github.com/nvm-sh/nvm/archive/refs/tags/v0.40.1.tar.gz

Offline installation

mkdir -p ~/.nvm

tar -xzf v0.40.1.tar.gz     -C ~/.nvm     --strip-components=1

echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' >> ~/.bashrc

source ~/.bashrc

Final step

mkdir -p /tmp/node-mirror/v20.20.2
export NVM_NODEJS_ORG_MIRROR=file:///tmp/node-mirror

cp index.tab /tmp/node-mirror/
cp node-v20.20.2-linux-x64.tar.gz /tmp/node-mirror/v20.20.2
cp SHASUMS256.txt /tmp/node-mirror/v20.20.2/

nvm install 20.20.2

Now NodeJS and NVM are installed

Please Wait!

Please wait... it will take a second!