centos用yum安装nodejs yarn

最近经常需要装nodejs,在发现有这个方法后,毅然抛弃了源码安装,舒服.

1
2
3
4
5
6
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
yum install -y nodejs
yum install -y gcc-c++ make
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum install yarn

参考资料

关注公众号 尹安灿