101.37.80.83
先打开gitbash 连接服务器
ssh root@101.37.80.83
是否要连接时选择yes 输入密码时输入 Zfpx2017 密码输入时不显示的,直接输入然后回车即可 出现以下提示就表示成功了
Welcome to Alibaba Cloud Elastic Compute Service !
apt-get update
npm是node包管理器
apt-get install npm
n是一个node模块,可以用来安装node
npm install n -g
n latest
apt-get install git
apt-get install mongodb
mongdb 安装完成后会自动启动,不需要手工启动了
git clone https://github.com/zhufengnodejs/201705crawl201705crawl.git
进入项目所在的目录
cd 201705crawl201705crawl
下载依赖的模块
npm install
设置日志的环境变量
export DEBUG=crawl:*
启动项目用来向数据库填充数据
node tasks/main.js
启动http服务器
node server.js
访问服务器
http://101.37.80.83:8080/
npm install pm2 -g
apt-get install nginx