Centos 下安装 NVM
自己 Mac 常用的 node 版本切换 工具是 n。但是在 Centos 7 上始终无法切换版本。
安装 NVM
1 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash |
加入系统环境
1 | source ~/.bashrc |
安装需要的 Node 版本
1 | nvm install [Node版本号] |
查看已安装的 Node 版本
1 | nvm list |
切换 Node 版本
1 | nvm use [Node版本号] |
主要是给自己的云服务器安装 Node 环境,能方便的使用 Node 版本。