http://my.oschina.net/blogshi/blog/260953
First go to the official website to download the code, here must pay attention to the installation of two, one is source code code, one is compiled file. I just follow the online source installation method to operate the compiled files, the results of a long time.
Watch out for what files you download!!! The corresponding installation method is different Ah, pro.
(a) Compiled files
Simply said that after decompression, in the Bin folder already exist node and NPM, if you go into the corresponding file in the execution of the command line a bit of a problem is not, but not the overall, so set this as the global good.
?
1 2 3 |
CD Node-v0.10.28-linux-x64/bin Ls ./node-v |
This will be completed, the node folder where the specific, what is the name of whatever you decide. Then set the global:
?
1 2 |
Ln-s/home/kun/mysofltware/node-v0.10.28-linux-x64/bin/node/usr/local/bin/node Ln-s/HOME/KUN/MYSOFLTWARE/NODE-V0.10.28-LINUX-X64/BIN/NPM/USR/LOCAL/BIN/NPM |
Here/home/kun/mysofltware/this path is your own, you will extract node files to where is.
(ii) compiling by source code
This way you download the file is source code, I don't like this way very much ... It's mainly trouble.
?
1 2 3 4 5 6 7 8 9 10 11 |
# tar XVF node-v0.10.28.tar.gz # CD node-v0.10.28 #./configure # make # make Install # cp/usr/local/bin/node/usr/sbin/ View the version of node that is currently installed # node-v v0.10.28 |
(c) Apt-get
There is also a shell hint of the apt-get way, I was this way before the pit ... Strongly not recommended.
?
1 2 |
sudo apt-get install Nodejs sudo apt-get install NPM |
When you're done, you'll find that the node command works, and the Nodejs command can be used ...
Linux configuration Nodejs