CentOS installation Nodejs and express development framework

Source: Internet
Author: User

This article demonstrates the installation of the Nodejs and Express development Framework on LinuxNote: I downloaded the latest Nodejs version number on the http://www.nodejs.org/official website.NodeJS v0.10.29 but in the./configure, said no path found, helpless under. Simply reduce the Nodejs version number to v0.10.24.

Now say the steps to take note. Lest the future forget,

the installation steps are as follows: Step 1, verify that the server has Nodejs compiled and dependent software, assuming that it is not possible to install by executing the following command.

[Email protected] local]# yum-y install gcc gcc-c++ openssl-devel
Step 2, download Nodejs source code package and unzip.

[Email protected] local]# wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz[[email protected] local]# tar ZXVF Node-v0.10.24.tar.gz[[email protected] local]# CD node-v0.10.24
Step 3, configure, compile, install.

[Email protected] node-v0.10.24]#/configure--prefix=/usr/local/node[roo[email protected] node-v0.10.24]# make && make Install
Step 4, next Configure the node environment

[Email protected] node-v0.10.24]# Vim/etc/profile
#set nodejs envexport node_home=/usr/local/nodeexport path= $NODE _home/bin: $PATHexport node_path= $NODE _home/lib/node _modules: $PATH [[email protected] node-v0.10.24]# Source/etc/profile    
  --Restart effectiveStep 5, test whether the successful installation

[Email protected] node-v0.10.24]# node-vv0.10.24
the Nodejs version appears to indicate OK. Step 6, Nodejs's Hello world

output: Hello NodeJS, I ' m bob.zStep 7, install the Express development framework

[[email protected] local]# NPM install Express-g
Step 8, create demo project

Step 9, go to the project folder and install the project dependent components

[[Email protected] local]# CD Demoapp[[email protected] demoapp]# NPM Install
Step 10, after the installation of dependent components to launch the app

[[Email protected] demoapp]# node appexpress server listening on port 3000

finally through the browser access to Server3000port, page display,Express

Welcome to Express


node + Express successfully launched the node development journey, enjoy it.

CentOS installation Nodejs and express development framework

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.