UU Blog

centos用yum安装nodejs yarn

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

1
2
3
4
5
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

参考资料

给作者打一针鸡血