git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> ~/.bashrc
nvm install v0.12.0
nvm alias default v0.12.0
以上可參考: https://github.com/creationix/nvm/
不推薦此方式,如果有需要可參考官方教學:
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager