1 安装git
yum install git
查看git版本
git --version
2 安装Node.js版本管理工具nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
或者
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm git地址
https://github.com/nvm-sh/nvm#install-script
导入环境变量
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
最后
bash: source ~/.bashrc
zsh: source ~/.zshrc
ksh: . ~/.profile