Install Node. js in CentOS

Source: Internet
Author: User

Install Node. js in CentOS

cd /usr/local/src/tar -zxvf node-v4.4.5.tar.gzcd node-v4.4.5./configure --prefix=/usr/local/node/4.4.5makemake install

Configure node. js

vim /etc/profile

Set the nodejs environment variable and add the following content on the line of export path user logname mail hostname histsize histcontrol:

#set for nodejsexport NODE_HOME=/usr/local/node/0.10.24export PATH=$NODE_HOME/bin:$PATH

: Wq save and exit. Compile/etc/profile to make the configuration take effect.

source /etc/profile

Verify whether the configuration is successfully installed

node -v

Gc ++ must be version 4.8.1

Reference http://www.cnblogs.com/kevinchou/p/5405540.html

cd /usr/local/src/tar  xf node-v5.11.1-linux-x64.tar.gz -C /usr/local/cd /usr/local/mv node-v5.11.1-linux-x64/ nodejsln -s /usr/local/nodejs/bin/node /usr/local/binln -s /usr/local/nodejs/bin/npm /usr/local/bin

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.