Linux Build Node Environment Super Detailed tutorial

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.