centis nodejs yarn安装及升级

/////////////////////安装nodejs
yum install epel-release
yum install nodejs

//////////////////////安装yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
#curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum install yarn

升级nodejs
sudo npm install n -g
sudo n stable

vi ~/.bash_profile
添加
export PATH=/usr/local/bin/:$PATH

再执行
source ~/.bash_profile

node --version

升级npm
sudo npm i -g npm

npm -version

发布了426 篇原创文章 · 获赞 33 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/whq12789/article/details/104564948
今日推荐