Install Nodejs v8.0.0 on CentOS

Source: Internet
Author: User

To be lazy to install the stable version, simple: Yum install-y Nodejs,

Then use the following two commands to view the version, if any, the installation succeeds

Npm-v
Node-v

Next is the right way to install NODEJS8:

First step: Download Nodejs

wget https://npm.taobao.org/mirrors/node/v8.0.0/node-v8.0.0-linux-x64.tar.xz 

Step Two: Unzip

TAR-XVF  node-v8.  0.0-linux-x64.tar.xz

Test whether the installation was successful

Enter the directory under the Unzip directory bin to execute the ls command

CD  node-v8.  0.0-linux-x64/bin && ls 

有nodeAndnpm

Test

./node-v

Installation Successful

Third Step NODE environment configuration
This allows you to use/usr/local/src/in any directory.Node-v4.2.3-linux-x86/bin got the node command,
The steps are as follows:
A, switch to the root user
B, Vi/etc/profile
c. Join at the bottom
# node (annotation function)
Export Node_home=/usr/local/src/node-v4.2.3-linux-x86
Export path= $PATH: $NODE _home/bin
Export Node_path= $NODE _home/lib/node_modules
D,: Wq (Save and exit)
E, source/etc/profile (make configuration file effective)

The fourth step is accomplished.
you can use NODE-V to see your own results!

Install Nodejs v8.0.0 on 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.