I’ve recently migrated to Linux CentOS7 from windows and I need to install Nodejs to my target, but in target system there is no Internet connection. How can I install Nodejs with all dependencies in offline mode? Thanks in advance for your answers.
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
you can download node.js binary from its website and you can copy that file using ssh to your target machine.
extract it and add its path to your environment variables.
for more details you can visit here
here is my procedure
To install NodeJS we need an online server to download requirements.
You can download it from Node’s official website. Make sure you download Linux binary version of it.
Or you can use this link:
- After downloading Linux Binary, copy it to your offline machine.
- Then go to the directory you copied and unzip your downloaded file by using tar command.
- Next step we are going to define the unzipped directory to our environment variables.to do this first go to /etc/profile.d and create a file. its name should be nodejs.sh
- Copy commands below to nodejs.sh file and save it.
Note : /home/node-v16.14.0-linux-x64/bin (file address) may differ from yours
Restart your session and then enjoy NodeJS on your offline Linux machine.
You can download the package, then SFTP the package to the target and then install it.