graybull's Blog

Linux安装node.js, express

1)Go to, and download the linux binaries: node-v0.10.0-linux-x64.tar.gz. You may download newer version of it.

2)unpack the package to /usr/local/node

#tar xzvf node-v0.10.0-linux-x64.tar.gz

3)set up evironment

# vi /etc/profile

add the following content into the file's end:

export NODE_HOME=/usr/local/node/node-v0.10.0-linux-x64
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules

save it then source it with:

#source /etc/profile

4) you can check it's version with:

#node -v

5) install express globally

# npm install -g express

After installation, you will find the express dir in: /usr/local/node/node-v0.10.0-linux-x64/lib/node_modules

Host by | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee