亚马逊云ec2-user安装node-js-18.16.0

1, 下载vnm管理工具

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
 export NVM_DIR="$HOME/.nvm"
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

  

2, vnm安装nodejs18.16.0

nvm install 18.16.0

  

3, 查看node和npm版本

node -v
nvm -v

  

posted @ 2024-02-18 16:54  solomon123  阅读(55)  评论(0编辑  收藏  举报