Last active
November 26, 2018 20:21
-
-
Save romelgomez/1bbeebfdbd01b04bd26b3a9179ee8c8e to your computer and use it in GitHub Desktop.
Install NODE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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