This article demonstrates installing the NODEJS and Express development Framework on Linux
Software Environment:VMware 9 CentOS 6.5 Nodejs v0.10.24
installation process:Step 1, verify that the server has Nodejs compiled and dependent software, if not can be installed by running the following command.
[root@bobserverstation local]# yum-y install gcc gcc-c++ openssl-devel
Step 2, download the Nodejs source package and unpack.
[Root@bobserverstation local]# wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz [root@bobserverstation local]# tar zxvf node-v0.10.24.tar.gz [root@bobserverstation local]# c D node-v0.10.24
Step 3, configuration, compilation, installation.
[Root@bobserverstation node-v0.10.24]#./configure--prefix=/usr/local/node [Root@bobserverstation node-v0.10.24]# && make install will continue to 3-4min ....
Step 4, then configure the node environment
[Root@bobserverstation node-v0.10.24]# Vim/etc/profile
#set Nodejs env Export Node_home=/usr/local/node export path= $NODE _home/bin: $PATH export node_path= $NODE _home/lib/node _modules: $PATH
[Root@bobserverstation node-v0.10.24]# source/etc/profile--Restart effective
Step 5, test whether the installation was successful
[Root@bobserverstation node-v0.10.24]# Node-v
v0.10.24 the Nodejs version number appears ok.
Step 6, Nodejs's Hello World
[Root@bobserverstation node-v0.10.24]# node
> Console.log ("Hello Nodejs, I ' m bob.z");
Hello Nodejs, I ' m bob.z
Undefined
> Output: Hello nodejs, I ' m bob.z
Step 7, the installation of Express development framework
[root@bobserverstation local]# npm Install Express-g
Step 8, create demo project
[Root@bobserverstation local]# Express DEMOAPP
[Root@bobserverstation local]# CD DEMOAPP
[Root@bobserverstation demoapp]#
Step 9, enter the project directory and install the project dependency component
[Root@bobserverstation local]# CD DEMOAPP
[Root@bobserverstation demoapp]# NPM Install
Step 10, start the app after the dependent component installation is complete
[Root@bobserverstation demoapp]# node app
Express Server listening on port 3000
Finally through the browser Access server 3000 port, page display, Express
Welcome to Express