准备工作

sudo yum clean all
sudo rm -fv /etc/yum.repos.d/nodesource*

Node

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
sudo yum install nodejs

yarn

curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn

VuePress

yarn global add vuepress
sudo nano ~/.zshrc

####
export PATH="$PATH:$(yarn global bin)"
####
source ~/.zshrc

参考链接

https://yarnpkg.com/lang/en/docs/install/#centos-stable
https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/
https://github.com/nodesource/distributions/issues/472

Last modification:February 2nd, 2020 at 08:43 pm