EOS学习(1) | 安装部署

eos-logo

本篇文章教你如何本地安装EOS。

EOSIO版本

  • Beginning build version: 1.2
  • 2018年 4月 9日 星期一 06时13分18秒 UTC
  • git head id: 124c62d0e1b3974bcd551b885518ff05301b39c9
  • Current branch: * master
  • ARCHITECTURE: Darwin

系统环境

  • OS name: Darwin
  • OS Version: 10.13.4

执行构建脚本

1
2
3
$ git clone https://github.com/eosio/eos --recursive
$ cd eos
$ ./eosio_build.sh

出现如下信息,表示构建成功:

验证

1
$ /usr/local/bin/mongod -f /usr/local/etc/mongod.conf & cd /Users/wangwei/eos/build; make test

测试结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Test project /Users/wangwei/eos/build
Start 1: validate_simple.token_abi
1/26 Test #1: validate_simple.token_abi ........... Passed 1.05 sec
Start 2: validate_eosio.token_abi
2/26 Test #2: validate_eosio.token_abi ............ Passed 0.07 sec
Start 3: validate_eosio.msig_abi
3/26 Test #3: validate_eosio.msig_abi ............. Passed 0.08 sec
Start 4: validate_multi_index_test_abi
4/26 Test #4: validate_multi_index_test_abi ....... Passed 0.09 sec
Start 5: validate_eosio.system_abi
5/26 Test #5: validate_eosio.system_abi ........... Passed 0.07 sec
Start 6: validate_identity_abi
6/26 Test #6: validate_identity_abi ............... Passed 0.08 sec
Start 7: validate_identity_test_abi
7/26 Test #7: validate_identity_test_abi .......... Passed 0.07 sec
Start 8: validate_currency_abi
8/26 Test #8: validate_currency_abi ............... Passed 0.08 sec
Start 9: validate_stltest_abi
9/26 Test #9: validate_stltest_abi ................ Passed 0.08 sec
Start 10: validate_exchange_abi
10/26 Test #10: validate_exchange_abi ............... Passed 0.08 sec
Start 11: validate_test.inline_abi
11/26 Test #11: validate_test.inline_abi ............ Passed 0.07 sec
Start 12: validate_asserter_abi
12/26 Test #12: validate_asserter_abi ............... Passed 0.08 sec
Start 13: validate_infinite_abi
13/26 Test #13: validate_infinite_abi ............... Passed 0.07 sec
Start 14: validate_proxy_abi
14/26 Test #14: validate_proxy_abi .................. Passed 0.07 sec
Start 15: validate_test_api_abi
15/26 Test #15: validate_test_api_abi ............... Passed 0.07 sec
Start 16: validate_test_api_mem_abi
16/26 Test #16: validate_test_api_mem_abi ........... Passed 0.07 sec
Start 17: validate_test_api_db_abi
17/26 Test #17: validate_test_api_db_abi ............ Passed 0.07 sec
Start 18: validate_test_api_multi_index_abi
18/26 Test #18: validate_test_api_multi_index_abi ... Passed 0.07 sec
Start 19: validate_eosio.bios_abi
19/26 Test #19: validate_eosio.bios_abi ............. Passed 0.08 sec
Start 20: validate_noop_abi
20/26 Test #20: validate_noop_abi ................... Passed 0.07 sec
Start 21: validate_dice_abi
21/26 Test #21: validate_dice_abi ................... Passed 0.08 sec
Start 22: chain_test_binaryen
22/26 Test #22: chain_test_binaryen ................. Passed 286.59 sec
Start 23: chain_test_wavm
23/26 Test #23: chain_test_wavm ..................... Passed 344.66 sec
Start 24: nodeos_run_test
24/26 Test #24: nodeos_run_test ..................... Passed 48.39 sec
Start 25: p2p_dawn515_test
25/26 Test #25: p2p_dawn515_test .................... Passed 1.13 sec
Start 26: nodeos_run_test-mongodb
26/26 Test #26: nodeos_run_test-mongodb ............. Passed 125.22 sec

100% tests passed, 0 tests failed out of 26

Total Test time (real) = 809.08 sec

安装

1
2
$ cd build
$ sudo make install

安装完成之后,在 /usr/local/bin 下会有 nodeoscleoskeosd 三个工具。

配置

  • nodeos配置文件:~/Library/Application Support/eosio/nodeos/config/config.ini
  • keosd配置文件:~/eosio-wallet/config.ini

介绍

  • nodeos (node + eos = nodeos) - 用于通过配置插件来运行节点的核心EOSIO节点守护程序。例如用于区块的生产,专用API端点和本地开发。
  • cleos (cli + eos = cleos) - 与主链交互以及管理钱包的命令行工具界面。
  • keosd (key + eos = keosd) - 将EOSIO密钥安全存储在钱包中的组件。

这些组件之间的基本关系如下图所示。 在接下来的部分中,您将构建EOSIO组件,并将它们部署在单个主机,单节点测试网络(testnet)配置中。

Basic-EOSIO-System-Architecture

参考资料

请我喝杯咖啡吧~