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