Skip to content

Instantly share code, notes, and snippets.

@romelgomez
Last active November 26, 2018 20:21
Show Gist options
  • Save romelgomez/1bbeebfdbd01b04bd26b3a9179ee8c8e to your computer and use it in GitHub Desktop.
Save romelgomez/1bbeebfdbd01b04bd26b3a9179ee8c8e to your computer and use it in GitHub Desktop.
Install NODE
# NODE
export PATH=$PATH:$HOME/workpace/node/node-v4.4.4-linux-x64/bin
# https://github.com/nodejs/help/wiki/Installation
### How to install Node.js via binary archive on Linux?
1. Unzip the binary archive to any directory you wanna install Node, I use `/usr/lib/nodejs`
```
sudo mkdir /usr/lib/nodejs
sudo tar -xJvf node-v6.5.0-linux-x64.tar.xz -C /usr/lib/nodejs
sudo mv /usr/lib/nodejs/node-v6.5.0-linux-x64 /usr/lib/nodejs/node-v6.5.0
```
2. Set the environment variable `~/.profile`, add below to the end
```
# Nodejs
export NODEJS_HOME=/usr/lib/nodejs/node-v6.5.0
export PATH=$NODEJS_HOME/bin:$PATH
```
3. Test installation using
`$ node -v`
`$ npm version`
the normal output is:
```
➜ nodejs node -v
v6.5.0
➜ npm version
{ npm: '3.10.3',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '57.1',
modules: '48',
node: '6.5.0',
openssl: '1.0.2h',
uv: '1.9.1',
v8: '5.1.281.81',
zlib: '1.2.8' }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment