I've downloaded nodejs I want to install it on Ubuntu 16.10 ,I have the node folder with this files
bin CHANGELOG.md include lib LICENSE README.md share
Where I have to place it to use node?
I've downloaded nodejs I want to install it on Ubuntu 16.10 ,I have the node folder with this files
bin CHANGELOG.md include lib LICENSE README.md share
Where I have to place it to use node?
You can place them anywhere and link to a bin folder. The common places are /usr/share
, /usr/local/share
. On my personal computer, I usually place things like that in my home directory like that: ~/bin/node/*
.
However, I would generally not recommend it with node, unless you have no choice. I would rather go with NVM. This way you can install any version of node you want and switch them if needed.
Let give this simple method:
Create a folder /home/$USERNAME/devenv
Download binaries into folder in step 1
untar
the node file
Create a symbolic link in the /home/$USERNAME/devenv
ln -s untared-node-file-name node
Place it in your path in the /home/$USERNAME/.profile
file with at the end:
PATH=$PATH:$HOME/devenv/node/bin
Source the /home/$USERNAME/.profile
by running this in terminal:
source ~/.profile
Now check with node -v
and npm -v
Information:
echo $PATH
to see the current path, and you'll see that ~/bin is the first item.
– heynnema
Mar 12 '17 at 16:07