Today, let's talk about how to compile and install nodejs separately. If so, let's take a look at the end. If not, let's install nodejs step by step.
System: centos 6.x( 64-bit)
Software version: nodejs 5.3.0
1. Upgrade gcc first
For more information about gcc, see this article.
2. Download node
Wget http://nodejs.org/dist/v5.3.0/node-v5.3.0.tar.gz
Or
Wget http://download.slogra.com/nodejs/node-v5.3.0.tar.gz
3. Compile and install node
Tar zxf node-v5.3.0.tar.gz & cd node-v5.3.0
./Configure
Make
Make install
Ln-s/usr/local/bin/node/usr/bin/node
4. Verify the node version
Node -- version
V5.3.0
5. Change npm source
Temporary use:
Npm -- registry https://registry.npm.taobao.org install
Permanent use:
Npm config set registry https://registry.npm.taobao.org
// Check whether the configuration is successful using the following method:
Npm config get registry
// Or
Npm info express
Now, we have completed the compilation and installation of Node. Js. We can only find out how to use the specific project.