Example of how to compile and install nodejs in centos

Source: Internet
Author: User
Tags centos install node

Today, let's talk about how to compile and install nodejs separately. If so, let's take a look at the end. If not, let's install nodejs step by step.


System: centos 6.x( 64-bit)
Software version: nodejs 5.3.0
1. Upgrade gcc first


For more information about gcc, see this article.

2. Download node
Wget http://nodejs.org/dist/v5.3.0/node-v5.3.0.tar.gz
Or
Wget http://download.slogra.com/nodejs/node-v5.3.0.tar.gz

3. Compile and install node
Tar zxf node-v5.3.0.tar.gz & cd node-v5.3.0
./Configure
Make
Make install
Ln-s/usr/local/bin/node/usr/bin/node

4. Verify the node version
Node -- version
V5.3.0

5. Change npm source
Temporary use:
Npm -- registry https://registry.npm.taobao.org install

Permanent use:
Npm config set registry https://registry.npm.taobao.org

// Check whether the configuration is successful using the following method:
Npm config get registry
// Or
Npm info express

Now, we have completed the compilation and installation of Node. Js. We can only find out how to use the specific project.

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.