CentOS安装node.js

LTS版本下执行:
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

最新版本(目前6.x版本)执行:
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -

然后用root用户安装:
yum -y install nodejs


如果要手工安装:
yum install gcc-c++ make
或者执行
yum groupinstall 'Development Tools'

通过源码编译安装

猜你喜欢

转载自xwhuang.iteye.com/blog/2309962