与你相遇好幸运,服务器node环境安装

时间:2022-05-10 22:07:37

>服务器更改root密码

sudo passwd root

>服务器ubuntu安装ssh

apt-get install openssh-server

>服务器开启root用户密码登陆

vi /etc/ssh/sshd_config

#PermitRootLogin without-password

PermitRootLogin yes

>安装nvm

https://github.com/creationix/nvm

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

>安装node

NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node

nvm install v4.4.4

>安装npm包

npm install -g nrm --registry=https://registry.npm.taobao.org

nrm use taobao

npm install node-gyp -g

npm install pm2 -g

npm install http-server

npm install mocha -g

npm install aglio -g

npm install gulp -g

npm install nodemon -g

npm install sails -g

npm install tsc -g

npm install webpack -g