centos7安装nodejs 和 yarn

如何从EPEL库安装Node.js

另一个有效且简单的方法来安装Node.js就是从官方库。这同样确保您可以访问到EPEL库,你可以通过运行以下命令。

sudo yum install epel-release

现在可以使用yum命令安装Node.js了。

sudo yum install nodejs

 

在 CentOS、Fedora、RHEL 上,你可以通过 RPM 包仓库安装 Yarn。

sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo

如果你没有安装 Node.js,你也应该配置 NodeSource 仓库

curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -

然后你可以简单的:

sudo yum install yarn
 
文章来自:http://www.cnblogs.com/thankyouGod/p/6838558.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3