Nodejs安装

Nodejs最好的安装和版本管理方式是使用nvm

https://github.com/creationix/nvm

举个例子:

cURL:

$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh

Wget:

$ wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh

安装完后,就可以安装nodejs了

$ nvm install 4.1.2