centos安装NVM
时间: 2024-04-23 21:20:30 浏览: 110
CentOS7下安装nvm
5星 · 资源好评率100%
以下是两种在CentOS上安装NVM的方法:
1. 配置环境变量[^1]
```shell
vim /etc/profile
export NVM_DIR="/usr/local/nvm-0.39.1" # 更改成自己的解压目录
[ -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. 使用wget命令安装[^2]
```shell
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
```
阅读全文