Play node.js-1. Install the node. JS development environment in the Novice on-road CentOS

Source: Internet
Author: User

1. Download the source code. Download the source code, you need to download the latest Nodejs version in https://nodejs.org/en/download/, this article takes v8.9.1 as an example:

cd/usr/local/src/wget http://nodejs.org/dist/v8.9.1/node-v8.9.1.tar.xz

2. Unzip the file.

Tar xvf node-v8.9.1-linux-x64.tar.xz

3. Setting the node and NPM commands is globally valid. Enter profile Edit environment variable

Cdvim/etc/profile

  

Add the following on the export PATH USER LOGNAME MAIL HOSTNAME histsize histcontrol Line:

Node-v8.9.2-linux-x64 (This is the name of the extracted folder, depending on the name you extracted)
#set for Nodejsexport node_home=/usr/local/node-v8.9.2-linux-x64export path= $NODE _home/bin: $PATH

: Wq Save and exit, compile/etc/profile make configuration effective

Source/etc/profile

Verify that the installation configuration is successful

Node-v

Output v8.9.2 indicates success

Npm-v

Output 5.5.1 indicates success

 

Play node.js-1. Install the node. JS development environment in the Novice on-road CentOS

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.