CentOS:NodeJs安装
NodeJS
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
NVM
yum remove nodejs npm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
source ~/.bashrc
nvm --version
nvm install stable
nvm install 4.8.3
如果安装Ghost,默认支持的是Node4或者^6
- 注意:如果是sudo -s这样进入root的会受到奇怪的sh: node: command not found的错误,应该su - root执行