CentOS:NodeJs安装:修订间差异
imported>Soleverlee 以“<source lang="bash"> curl --silent --location https://rpm.nodesource.com/setup_7.x | bash - </source> *https://nodejs.org/en/download/package-manager/#enterprise-lin...”为内容创建页面 |
imported>Soleverlee |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
=NodeJS= | |||
<source lang="bash"> | <source lang="bash"> | ||
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash - | curl --silent --location https://rpm.nodesource.com/setup_7.x | bash - | ||
</source> | </source> | ||
*https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora | *https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora | ||
=NVM= | |||
<source lang="bash"> | |||
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 | |||
</source> | |||
如果安装Ghost,默认支持的是Node4或者^6 | |||
*注意:如果是sudo -s这样进入root的会受到奇怪的sh: node: command not found的错误,应该su - root执行 | |||
[[Category:Linux/Unix]] | [[Category:Linux/Unix]] |
2017年5月15日 (一) 14:19的最新版本
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执行