Steps:
1. Login website https://nodejs.org find the Big Green download button in the middle of the page, right click, copy file download connection, similar to: https://nodejs.org/dist/v6.10.2/ Node-v6.10.2-linux-x64.tar.xz
2. Download the file using wget wget-c https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz
3. Unzip. First Use xz-k-D node-v6.10.2-linux-x64.tar.xz to extract into Xxx.tar
Then use the tar xvf Xxx.tar to unpack the package.
4. Move the extracted folder to any place (e.g. ~/thisnode/): sudo mv node-v6.10.2-linux-x64 ~/thisnode
5. Create a soft link: sudo ln-s ~/thisnode/node-v6.10.2-linux-x64/bin/node/usr/local/bin/node
sudo ln-s ~/thisnode/node-v6.10.2-linux-x64/bin/npm/usr/local/bin/npm
6. Check installation: sudo node-v results should show version number v6.10.2, success.
Resources:
https://my.oschina.net/blogshi/blog/260953
Https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
Note: The following two commands may install the wrong package.
sudo apt-get install Nodejs
sudo apt-get install NPM
Ubuntu 16.10 installs node. js