linux安装nvm和nodejs
下载nvm包: [root@centos ~]# wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash => Downloading nvm as script to '/root/.nvm' => Appending nvm source string to /root/.bashrc => Appending bash_completion source string to /root/.bashrc => Close and reopen your terminal to start using nvm or run the following to use it now: 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 上面提示相关的环境变量已经在配置文件/root/ .bashrc 中给我们自动添加好了