There are many installation methods. The following is my favorite method. The installation path does not have to be the same as that of me.
The latest version is v0.10.28.
Windows
1. Download (put it to E: \ node \ nodejs ):
Http://nodejs.org/dist/latest/x64/node.exe
Http://nodejs.org/dist/npm/npm-1.4.9.zip
2. Unzip (to the current directory): npm-1.4.9.zip
3. environment variables:
Add: E: \ node \ nodejs In Path
4. Modify npm Configuration:
C: \ Users \ cdz \. npmrc file input the following content
Userconfig = E: \ node \ nodejs \ node_modules \ npm \. npmrc
Tmp = E: \ node \ npm-tmp
Prefix = E: \ node \ npm-global
Cache = E: \ node \ npm-cache
Init-module = E: \ node \ nodejs \ node_modules \ npm \. npm-init.js
Linux & Mac
1. Download (put it to/Users/cdz/dev_soft_installed ):
Http://nodejs.org/dist/latest/node-v0.10.28.tar.gz
2. Unzip the command:
Tar zxvf node-v0.10.28.tar.gz
3. Enter the decompressed directory:
Cd node
4. Environment Configuration:
./Configure [-- prefix = "installation directory"]
5. Compile
Make
6. Installation
[Sudo] make install
7. environment variable settings:
In ~ /Add the following content to the. bash_profile file.
# Set for nodejs
Export NODE_HOME =/Users/cdz/dev_soft_installed/node
Export PATH = $ NODE_HOME/bin: $ PATH
Export NODE_PATH = $ NODE_HOME/lib/node_modules: $ PATH
Document Information
- Copyright statement: Free Reprint-non commercial-Non derivative-keep the signature | Creative Commons BY-NC-ND 3.0
- Http://blog.csdn.net/cdztop/article/details/28224047
- Last modification time: June 03, 2014