1.下载并安装 mongod
启动 mongod
cd C:\Program Files\MongoDB\Server\3.2\bin
C:\Program Files\MongoDB\Server\3.2\bin>mongod.exe --dbpath D:\javasoft\mongod-db\data
D:\javasoft\mongod-db\data 为数据保存目录(这是自己新建的,路径中不能有空格)
2.从 github 上下载 reliable-macaca-docker-compose
$ git clone https://github.com/reliablejs/reliable-macaca-docker-compose.git
Cloning into 'reliable-macaca-docker-compose'...
remote: Counting objects: 37, done.
remote: Total 37 (delta 0), reused 0 (delta 0), pack-reused 37
Unpacking objects: 100% (37/37), done.
Checking connectivity... done.
然后进入该目录,解压 backup.tar.gz
恢复数据到本地安装的数据库中
在 cmd 中跳转到 mongod 安装目录的 bin 目录下,执行 mongorestore -d reliable E:\macaca\reliable\reliable-macaca-docker-compose\backup\reliable
E:\macaca\reliable\reliable-macaca-docker-compose\backup\reliable 为上边的 backup 解压路径
用数据库连接工具查看:
如图所示,说明数据成功导入。
3.配置 redis
redis 目录如下:
启动 redis-server.exe
4.配置 reliable-master
首先下载 reliable-master
$ git clone https://github.com/reliablejs/reliable-master.git
Cloning into 'reliable-master'...
remote: Counting objects: 992, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 992 (delta 7), reused 0 (delta 0), pack-reused 942
Receiving objects: 100% (992/992), 301.72 KiB | 182.00 KiB/s, done.
Resolving deltas: 100% (517/517), done.
Checking connectivity... done.
需要安装 MinGW 编译器
下载安装参考:http://blog.csdn.net/tennysonsky/article/details/42706861
编译项目:
make build
报错如下:
$ make build
process_begin: CreateProcess(NULL, npm install --registry=https://registry.npm.t aobao.org, ...) failed.
make (e=2): ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒
make: *** [install] Error 2
这里需要设置淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
配置完淘宝镜像后再次编译
报错如下:
Administrator@0UBHMVKRGZYI1JK MINGW64 /e/macaca/reliable2/reliable-master (2.0)
$ make build
npm WARN deprecated native-or-bluebird@1.1.2: 'native-or-bluebird' is deprecated . Please use 'any-promise' instead.
npm WARN deprecated native-or-bluebird@1.2.0: 'native-or-bluebird' is deprecated . Please use 'any-promise' instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install th e latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail o n node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible . Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> zmq@2.13.0 install E:\macaca\reliable2\reliable-master\node_modules\zmq
> node-gyp rebuild
E:\macaca\reliable2\reliable-master\node_modules\zmq>if not defined npm_config_n ode_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\ node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod e_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node -gyp\lib\configure.js:404:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\macaca\reliable2\reliable-master\node_modules\zmq
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
> spawn-sync@1.0.13 postinstall E:\macaca\reliable2\reliable-master\node_modules \pre-commit\node_modules\cross-spawn\node_modules\spawn-sync
> node postinstall
> pre-commit@1.1.3 install E:\macaca\reliable2\reliable-master\node_modules\pre- commit
> node install.js
npm WARN optional dep failed, continuing fsevents@1.0.15
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing fsevents@1.0.15
需要 Python,而且版本在 2.5 到 3.0 之间,下载安装,配置环境变量 (我使用的是 2.7 版本)
再次编译 make build
报错:
Administrator@shisy MINGW64 /e/macaca/reliable/reliable-master (2.0)
$ make build
> zmq@2.13.0 install E:\macaca\reliable\reliable-master\node_modules\zmq
> node-gyp rebuild
E:\macaca\reliable\reliable-master\node_modules\zmq>if not defined npm_config_node_gyp (node "D:\soft\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: socket hang up
gyp ERR! stack at TLSSocket.onHangUp (_tls_wrap.js:1054:19)
gyp ERR! stack at TLSSocket.g (events.js:260:16)
gyp ERR! stack at emitNone (events.js:72:20)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at endReadableNT (_stream_readable.js:921:12)
gyp ERR! stack at nextTickCallbackWith2Args (node.js:442:9)
gyp ERR! stack at process._tickCallback (node.js:356:17)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\\soft\\nodejs\\node.exe" "D:\\soft\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\macaca\reliable\reliable-master\node_modules\zmq
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\soft\\nodejs\\node.exe" "D:\\soft\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--registry=https://registry.npm.taobao.org"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.13.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.13.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\macaca\reliable\reliable-master\npm-debug.log
make: *** [install] Error 1
原因:
编译时没有将 zmq 下载下来
zmq 在 window 下需要 visual studio 和 node.js 或 io.js 环境
所以下载并安装 visual studio(本文使用 2015 社区版,在官网下载即可)
下载地址:https://www.visualstudio.com/zh-hans/downloads/
下载安装完成后,再次 make build
报错如下:
$ make build
> zmq@2.13.0 install E:\macaca\reliable2\reliable-master\node_modules\zmq
> node-gyp rebuild
E:\macaca\reliable2\reliable-master\node_modules\zmq>if not defined npm_config_n ode_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\ node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
▒ڴ˽▒▒▒▒▒▒▒▒һ▒▒▒▒▒▒һ▒▒▒▒Ŀ▒▒▒▒Ҫ▒▒▒ò▒▒▒▒▒▒ɣ▒▒▒▒▒ӡ▒/m▒▒▒▒▒ء▒
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [E:\macaca\reliable2\reliable-master\node_modules\zmq\build\zmq.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\macaca\reliable2\reliable-master\node_modules\zmq
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--registry=https://registry.npm.taobao.org"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.13.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.13.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\macaca\reliable2\reliable-master\npm-debug.log
make: *** [install] Error 1
原因是:
The Windows SDK version 8.1 was not found
所以下载安装 Windows sdk 8.1(下载地址:https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk)
再次编译
Administrator@0UBHMVKRGZYI1JK MINGW64 /e/macaca/reliable2/reliable-master (2.0)
$ make build
> zmq@2.13.0 install E:\macaca\reliable2\reliable-master\node_modules\zmq
> node-gyp rebuild
E:\macaca\reliable2\reliable-master\node_modules\zmq>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
▒ڴ˽▒▒▒▒▒▒▒▒һ▒▒▒▒▒▒һ▒▒▒▒Ŀ▒▒▒▒Ҫ▒▒▒ò▒▒▒▒▒▒ɣ▒▒▒▒▒ӡ▒/m▒▒▒▒▒ء▒
TRACKER : ▒▒▒▒ TRK0005: δ▒▒▒ҵ▒: ▒▒CL.exe▒▒▒▒ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒▒ļ▒▒▒
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: ▒▒CL.exe▒▒▒▒▒˳▒▒▒▒▒▒▒Ϊ 5▒▒ [E:\macaca\reliable2\reliable-master\node_modules\zmq\build\zmq.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\macaca\reliable2\reliable-master\node_modules\zmq
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--registry=https://registry.npm.taobao.org"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! zmq@2.13.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.13.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\macaca\reliable2\reliable-master\npm-debug.log
make: *** [install] Error 1
这里是 E:\macaca\reliable2\reliable-master\node_modules\zmq\build\zmq.vcxproj 文件无法编译
所以用 cnpm install 先将 zmq 下载下来,然后找到该文件用 visual studio 打开,visual studio 提示如下图:
点击安装
然后下一步,直至安装完成。
然后删除项目下 node_modules 文件夹,再次编译项目:
Hash: a7ed9f4ae2136319f93e
Version: webpack 1.13.3
Time: 7898ms
Asset Size Chunks Chunk Names
auth.js 3.86 kB 0 [emitted] auth
dashboard.js 1.14 MB 1 [emitted] dashboard
history.js 1.14 MB 2 [emitted] history
home.js 1.14 MB 3 [emitted] home
index.js 2.46 kB 4 [emitted] index
login.js 3.41 kB 5 [emitted] login
password.js 4.6 kB 6 [emitted] password
signup.js 4.07 kB 7 [emitted] signup
task.js 1.14 MB 8 [emitted] task
user.js 1.4 kB 9 [emitted] user
+ 191 hidden modules
出现如上所示,表示编译成功。
启动 server
make server
$ make server
./bin/reliable-master server -p 3333 -w 1 --verbose
>> index.js:44:14 [master] pid:9796 worker fork success
>> index.js:62:14 [master] pid:9796 worker online
>> index.js:21:10 [worker:1] pid:9752 workder init with config:
{ server: { worker: '1', port: '3333', protocol: 'http', verbose: true },
database: 'mongodb://localhost/reliable',
site:
{ title: 'Reliable',
baseurl: 'http://reliable-test.com',
locale: 'en-US',
docurl: 'https://macacajs.github.io/macaca',
issueurl: 'https://github.com/reliablejs/reliable-master',
login: true },
auth:
{ github:
{ client_id: '8bb3d4f7fa7d3d346a58',
client_secret: '416bdc362cefb378587aa75c1db9bdd4c84a3461' },
gitlab:
{ protocol: 'http',
server_url: '127.0.0.1:3000',
client_id: '8bb3d4f7fa7d3d346a58',
client_secret: '416bdc362cefb378587aa75c1db9bdd4c84a3461' } },
mail:
{ name: 'reliable test',
port: 465,
host: 'smtp.reliable-test.com',
secure: true,
ignoreTLS: true,
auth: { user: 'test@reliable-test.com', pass: 'reliable' },
sloganImage: 'https://avatars0.githubusercontent.com/u/9263042?v=3&s=200' },
plugins: {},
pluginTextPrefix: 'reliable-plugin',
pkg:
{ name: 'reliable-master',
version: '1.1.1',
description: 'Distributed reliable continuous integration service.',
keywords: [ 'ci', 'automation', [length]: 2 ],
bin: { 'reliable-master': './bin/reliable-master' },
repository:
{ type: 'git',
url: 'git@github.com:reliablejs/reliable-master.git' },
dependencies:
{ 'ansi-to-html': '~0.3.0',
babel: '~5.6.14',
badgeboard: '~0.1.1',
bcryptjs: '~2.2.1',
chalk: '~1.1.1',
co: '~4.6',
'co-body': '~1.1.0',
'co-request': '^0.2.1',
commander: '~2.0.0',
'detect-port': '~0.1.3',
koa: '~0.21.0',
'koa-csrf': '2.1.3',
'koa-favicon': '~1.2.0',
'koa-generic-session': '~1.10.0',
'koa-redis': '~1.0.1',
'koa-router': '~3.7.0',
'koa-static': '~1.4.7',
mongoose: '=4.1.5',
nodemailer: '~1.4.0',
'npm-update': '1.0.2',
react: '~0.14.0',
'react-dom': '~0.14.2',
redis: '~2.3.1',
'reliable-events': '^0.1.4',
'reliable-github-oauth': '^1.0.0',
'reliable-gitlab-oauth': '^1.0.0',
'reliable-logger': '^1.0.7',
'reliable-mail': '^0.2.0',
'reliable-plugin': '^0.1.8',
validator: '~3.37.0',
xutil: '~1.0.0',
yamljs: '~0.2.4',
zmq: '2.13.0' },
devDependencies:
{ 'co-mocha': '~1.1.2',
'command-line-test': '^1.0.5',
eslint: '~1.1.0',
'eslint-plugin-react': '~3.2.3',
istanbul: '*',
'json-loader': '~0.5.2',
'jsx-loader': '~0.13.2',
killing: '~1.0.1',
mocha: '~2.4.5',
'pre-commit': '~1.1.1',
'react-d3-components': '~0.6.0',
should: '*',
webpack: '^1.13.1' },
scripts: { test: 'make test', lint: 'make lint' },
'pre-commit': [ 'lint', [length]: 1 ],
engines: { node: '>=4.2.1' },
homepage: 'https://reliablejs.github.io/reliable',
license: 'MIT' } }
>> index.js:32:10 [worker:1] pid:9752 base middlewares attached
>> index.js:36:12 [worker:1] pid:9752 middleware: i18n registed
>> render.js:15:8 [worker:1] pid:9752 render view path: E:\macaca\reliable\reliable-master\web\views
>> index.js:36:12 [worker:1] pid:9752 middleware: inject registed
>> index.js:36:12 [worker:1] pid:9752 middleware: favicon registed
>> index.js:36:12 [worker:1] pid:9752 middleware: powerby registed
>> index.js:36:12 [worker:1] pid:9752 middleware: static registed
>> router.js:41:10 [worker:1] pid:9752 router set
>> index.js:67:14 [master] pid:9796 listening worker id: 1, pid: 9752, address: 172.16.250.5:3333
>> Server start at 2016-11-03 11:12:22 | http://172.16.250.5:3333
如上图所示,用浏览器访问:http://172.16.250.5:3333 如下图:
5.创建用户
$ make adduser
./bin/reliable-master adduser
*****************************************
* version 1.0.0 is outdate *
* run: npm i -g reliable-master@1.1.1 *
*****************************************
y
Do you want create an account? [Y/N]y
User Id: qwertyui
shishy
Email address: 123456789@qq.com
123456789@qq.com
Password: 123456
123456
isAdmin [Y/N]: E:\macaca\reliable\reliable-master\bin\reliable-master-adduser:82
process.stdout.clearLine();
^
TypeError: process.stdout.clearLine is not a function
at Socket.passwordListener (E:\macaca\reliable\reliable-master\bin\reliable-master-adduser:82:20)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at Pipe.onread (net.js:536:20)
Administrator@shisy MINGW64 /e/macaca/reliable/reliable-master (2.0)
如上图所示,用户创建成功。
注:这里的报错信息不用理会,属于 bug,事实上已经注册成功了,用注册的用户直接在页面登录即可。
6.配置 slave
下载 slave
$ git clone https://github.com/reliablejs/reliable-macaca-slave.git
Cloning into 'reliable-macaca-slave'...
remote: Counting objects: 373, done.
remote: Compressing objects: 100% (12/12), done.
Receiving objects: 77% (288/37remote: Total 373 (delta 3), reused 0 (delta 0), pack-reused 361
Receiving objects: 100% (373/373), 114.60 KiB | 56.00 KiB/s, done.
Resolving deltas: 100% (180/180), done.
Checking connectivity... done.
进入该项目,使用 npm install 下载依赖
Administrator@shishy MINGW64 /e/macaca/reliable2/reliable-macaca-slave (master)
$ npm install
npm WARN peerDependencies The peer dependency mocha@>=1.18 <4 included from co-mocha will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated native-or-bluebird@1.2.0: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated win-spawn@2.0.0: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
> zmq@2.15.3 install E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq
> node-gyp rebuild
E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
▒ڴ˽▒▒▒▒▒▒▒▒һ▒▒▒▒▒▒һ▒▒▒▒Ŀ▒▒▒▒Ҫ▒▒▒ò▒▒▒▒▒▒ɣ▒▒▒▒▒ӡ▒/m▒▒▒▒▒ء▒
binding.cc
win_delay_load_hook.cc
..\binding.cc(673): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(674): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(675): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(676): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(677): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(678): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(679): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(680): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(681): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(682): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(696): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(697): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(698): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(699): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(700): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(701): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(702): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(703): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(704): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒const int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(705): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒int▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(1140): warning C4267: ▒▒▒▒▒▒▒▒: ▒ӡ▒size_t▒▒ת▒▒▒▒▒▒uint32_t▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(1285): warning C4267: ▒▒▒▒▒▒▒▒: ▒ӡ▒size_t▒▒ת▒▒▒▒▒▒uint32_t▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(1286): warning C4267: ▒▒▒▒▒▒▒▒: ▒ӡ▒size_t▒▒ת▒▒▒▒▒▒uint32_t▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
e:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\node_modules\nan\nan_new.h(208): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒int64_t▒▒ת▒▒▒▒▒▒double▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ (▒▒▒▒Դ▒ļ▒ ..\binding.cc) [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(624): note: ▒μ▒▒▒▒▒▒ڱ▒▒▒ĺ▒▒▒ ģ▒▒ ʵ▒▒▒▒▒▒v8::Local<v8::Number> Nan::New<v8::Number,T>(A0)▒▒▒▒▒▒▒▒
with
[
T=int64_t,
A0=int64_t
]
..\binding.cc(678): note: ▒μ▒▒▒▒▒▒ڱ▒▒▒ĺ▒▒▒ ģ▒▒ ʵ▒▒▒▒▒▒v8::Local<v8::Value> zmq::Socket::GetSockOpt<int64_t>(int)▒▒▒▒▒▒▒▒
e:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\node_modules\nan\nan_new.h(208): warning C4244: ▒▒▒▒▒▒▒▒: ▒ӡ▒uint64_t▒▒ת▒▒▒▒▒▒double▒▒▒▒▒▒▒ܶ▒ʧ▒▒▒▒ (▒▒▒▒Դ▒ļ▒ ..\binding.cc) [E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\zmq.vcxproj]
..\binding.cc(624): note: ▒μ▒▒▒▒▒▒ڱ▒▒▒ĺ▒▒▒ ģ▒▒ ʵ▒▒▒▒▒▒v8::Local<v8::Number> Nan::New<v8::Number,T>(A0)▒▒▒▒▒▒▒▒
with
[
T=uint64_t,
A0=uint64_t
]
..\binding.cc(680): note: ▒μ▒▒▒▒▒▒ڱ▒▒▒ĺ▒▒▒ ģ▒▒ ʵ▒▒▒▒▒▒v8::Local<v8::Value> zmq::Socket::GetSockOpt<uint64_t>(int)▒▒▒▒▒▒▒▒
▒▒▒ڴ▒▒▒▒▒ E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\Release\zmq.lib ▒Ͷ▒▒▒ E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\Release\zmq.exp
▒▒▒▒▒▒▒ɴ▒▒▒
▒▒▒▒ɴ▒▒▒▒▒▒▒▒
zmq.vcxproj -> E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\Release\\zmq.node
zmq.vcxproj -> E:\macaca\reliable2\reliable-macaca-slave\node_modules\zmq\build\Release\zmq.pdb (Full PDB)
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional dep failed, continuing fsevents@1.0.15
> uiautomator-client@1.0.29 install E:\macaca\reliable2\reliable-macaca-slave\node_modules\macaca-android\node_modules\uiautomator-client
> node ./scripts/build.js
please set ANT_HOME
JAVA_HOME is set to C:\javasoftware\javajdk8
这里需要设置 ant_home
下载 Apache ant 的包,下载路径: http://ant.apache.org/bindownload.cgi
然后解压,设置环境变量
然后删掉项目下 node_modules 目录,重新下载依赖。
下载完成后:
执行 ./bin/reliable-macaca-slave server -m 192.168.155.2:3333 --verbose 连接到 master。
Administrator@shishy MINGW64 /e/macaca/reliable2/reliable-macaca-slave (master)
$ ./bin/reliable-macaca-slave server -m 192.168.155.2:3333 --verbose
>> request.js:24:12 [master] pid:4612 get remote update info failed.
>> index.js:59:14 [master] pid:5140 worker fork success
>> index.js:62:14 [master] pid:5140 worker online
>> index.js:65:14 [master] pid:5140 listening worker id: 1, pid: 7140, address: 192.168.155.2:4000
>> index.js:149:12 [worker:1] pid:7140 slave init with
{ webPort: 8080,
verbose: true,
ios: false,
port: 4000,
registry: 'http://registry.npmjs.org',
master: 'http://192.168.155.2:3333',
ip: '192.168.155.2' }
>> index.js:54:12 [worker:1] pid:7140 Zmq Reconnecting...
>> index.js:78:10 [worker:1] pid:7140 Connected to the master server.
>> index.js:9:10 [worker:1] pid:7140 base middlewares attached
>> render.js:15:8 [worker:1] pid:7140 render view path: E:\macaca\reliable2\reliable-macaca-slave\web\views
>> index.js:15:12 [worker:1] pid:7140 middleware: inject registed
>> index.js:15:12 [worker:1] pid:7140 middleware: favicon registed
>> index.js:15:12 [worker:1] pid:7140 middleware: powerby registed
>> index.js:15:12 [worker:1] pid:7140 middleware: static registed
>> Temp directory not existed, check after one day.
>> index.js:65:14 [master] pid:5140 listening worker id: 1, pid: 7140, address: 192.168.155.2:8080
>> Slave Web Server start with options
{ webPort: 8080,
verbose: true,
ios: false,
port: 4000,
registry: 'http://registry.npmjs.org',
master: 'http://192.168.155.2:3333',
ip: '192.168.155.2' }
>> index.js:65:14 [master] pid:5140 listening worker id: 1, pid: 7140, address: 192.168.155.2:8080
>> channel.js:73:14 [worker:1] pid:7140
<--- zmq message
{ sysInfo:
{ cpus:
[ { model: 'AMD A8-4500M APU with Radeon(tm) HD Graphics ',
speed: 1896,
times: { user: 140416, nice: 0, sys: 151710, idle: 4438259, irq: 7082 } },
{ model: 'AMD A8-4500M APU with Radeon(tm) HD Graphics ',
speed: 1896,
times: { user: 292579, nice: 0, sys: 187872, idle: 4249186, irq: 11793 } },
{ model: 'AMD A8-4500M APU with Radeon(tm) HD Graphics ',
speed: 1896,
times: { user: 242222, nice: 0, sys: 178231, idle: 4309059, irq: 5756 } },
{ model: 'AMD A8-4500M APU with Radeon(tm) HD Graphics ',
speed: 1896,
times: { user: 226435, nice: 0, sys: 167888, idle: 4335064, irq: 10545 } },
[length]: 4 ],
memory: 0.5367159705046588,
type: 'Windows_NT',
platform: 'win32',
uptime: '0d 1h 18m',
release: '6.1.7601',
hostname: 'shishy',
port: undefined },
type: 'ack',
data: 'hello master',
status: 'ack' }
刷新 Reliable 页面如下图:
到这里 win7 系统搭建 master-slave 环境搭建就完成了。