Summary of installing nodejs in centos
Nodejs's rookie tutorial website http://www.runoob.com/nodejs/nodejs-install-setup.html
The version of nodejs installed by following the steps in the rookie tutorial is node-v0.10.24.tar.gz.
After decompressing and compiling, use node-v to check that the version number cannot be displayed, indicating that the configuration failed.
But go to the installation directory / usr/local/node/0.10.24/bin and use. / node-v to view the version number.
Actually, it's not the installation failure, it's just that the environment variables are not configured.
Configure environment variables:
Cd ~
Vi .bash _ profile
PATH=$PATH:$HOME/bin:/usr/local/node/0.10.24/bin/
You can successfully use the command node-v