Install Node. js in CentOS
cd /usr/local/src/tar -zxvf node-v4.4.5.tar.gzcd node-v4.4.5./configure --prefix=/usr/local/node/4.4.5makemake install
Configure node. js
vim /etc/profile
Set the nodejs environment variable and add the following content on the line of export path user logname mail hostname histsize histcontrol:
#set for nodejsexport NODE_HOME=/usr/local/node/0.10.24export PATH=$NODE_HOME/bin:$PATH
: Wq save and exit. Compile/etc/profile to make the configuration take effect.
source /etc/profile
Verify whether the configuration is successfully installed
node -v
Gc ++ must be version 4.8.1
Reference http://www.cnblogs.com/kevinchou/p/5405540.html
cd /usr/local/src/tar xf node-v5.11.1-linux-x64.tar.gz -C /usr/local/cd /usr/local/mv node-v5.11.1-linux-x64/ nodejsln -s /usr/local/nodejs/bin/node /usr/local/binln -s /usr/local/nodejs/bin/npm /usr/local/bin