[root@BobServerStation local]# yum -y install gcc gcc-c++ openssl-devel
[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]# cd node-v0.10.24
[root@BobServerStation node-v0.10.24]# ./configure --prefix=/usr/local/node [root@BobServerStation node-v0.10.24]# make && make install
[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
[root@BobServerStation node-v0.10.24]# node -v v0.10.24
[root@BobServerStation node-v0.10.24]# node > console.log(”Hello NodeJS, I'm Bob.Z“); Hello NodeJS, I'm Bob.Z undefined >
[root@BobServerStation local]# npm install express -g
[root@BobServerStation local]# express DemoApp [root@BobServerStation local]# cd DemoApp [root@BobServerStation DemoApp]#
[root@BobServerStation local]# cd DemoApp [root@BobServerStation DemoApp]# npm install
[root@BobServerStation DemoApp]# node app Express server listening on port 3000
Welcome to Express
CentOS安装NodeJS及Express开发框架,布布扣,bubuko.com
原文地址:http://blog.csdn.net/confidence68/article/details/38302285