Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

单用户nvm的安装

$
0
0

增加个pm2用户:

groupadd pm2  
useradd -m -s /bin/bash -g pm2 pm2  

clone整个nvm项目

sudo su - pm2  
git clone https://github.com/creationix/nvm.git ~/.nvm  
cat<EOF>>~/.bashrc  
export NVM_DIR="/home/pm2/.nvm"  
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
EOF  
source ~/.bashrc  

安装node

nvm list  
nvm install v4.4.7  
npm i pm2 -g  

Viewing all articles
Browse latest Browse all 290

Trending Articles