Linux Environment Setup Detailed steps
1. Visit official website: https://nodejs.org/en/download/
2. Select the compression package associated with your server version, copy the download link
3. Server login ssh, (here I use the server is centos7,64 bit)
wget HTTPS://NODEJS.ORG/DIST/V8.11.1/NODE-V8.11.1-LINUX-X64.TAR.XZ
4. After downloading, you will find the end of XZ, with the command
Xz-d NODE-V8.11.1-LINUX-X64.TAR.XZ
And then in
Ls
You'll find the bag is Node-v8.11.1-linux-x64.tar.
If you are prompted that the XZ command does not exist, install it
Xz
Https://sourceforge.net/projects/lzmautils/files/latest/download?source=typ_redirect
TAR-ZXVF xz-5.2.3.tar.gz
CD xz-5.2.3
./configure--prefix=/opt/gnu/xz #指定安装目录
Make && make install #编译并安装
Ln-s/opt/gun/xz/bin/xz/usr/local/bin/xz #建立软链接
5. After decompression, modify the folder name MV Node-v8.11.1-linux-x64 node-8.1
TAR-XVF Node-v8.11.1-linux-x64.tar
MV Node-v8.11.1-linux-x64 node-8.1
6. Go to the node-8.1 directory and enter the following command
CD node-8.1
CD bin
./node-v
Seeing the version means it's okay.
7. Last step, add a link, use the command directly,
I am here in the root directory installed, all the connection address is root/xxx
Ln-s/root/node-8.1/bin/node/usr/local/bin/node
Ln-s/ROOT/NODE-8.1/BIN/NPM/USR/LOCAL/BIN/NPM
9. Then enter directly on the console
Node-v
Done!
have been playing on win Node,linux installation I also tidied up a bit, convenient memory
Linux Build Node Environment Super Detailed tutorial