- 通过Homebrew安装
- 国内下载地址
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
- 安装nvm
brew install nvm
配置nvm环境变量
export NVM_DIR=“$HOME/.nvm”
[ -s “/usr/local/opt/nvm/nvm.sh” ] && . “/usr/local/opt/nvm/nvm.sh”
# zsh
vim ~/.zshrc # 修改
source ~/.zshrc # 保存vim /Users/hal/.zprofile # 修改
source /Users/hal/.zprofile # 保存vim ~/.zprofile # 修改
source ~/.zprofile # bash
vim ~/.bash_profile # maven的环境变量配置在这
source ~/.bash_profile