1、EOS软件包下载
下载地址:https://github.com/EOSIO/eos/releases/download/v2.0.6/eosio_2.0.6-1-ubuntu-16.04_amd64.deb
2、安装依赖包:
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update
sudo apt-get install libicu55
root@ip-10-0-2-120:/data/coins/EOS# sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe Sources [284 kB]
Get:5 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1000 kB]
Get:6 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1090 kB]
Get:7 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [338 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:9 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu bionic InRelease
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [889 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [332 kB]
Fetched 4294 kB in 3s (1315 kB/s)
Reading package lists... Done
root@ip-10-0-2-120:/data/coins/EOS# sudo apt-get update
Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
root@ip-10-0-2-120:/data/coins/EOS# sudo apt-get install libicu55
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-aws-5.3-headers-5.3.0-1017 linux-aws-5.3-headers-5.3.0-1019 linux-aws-headers-4.15.0-1044 linux-aws-headers-4.15.0-1054 linux-aws-headers-4.15.0-1056 linux-aws-headers-4.15.0-1057 linux-aws-headers-4.15.0-1058 linux-aws-headers-4.15.0-1060
linux-aws-headers-4.15.0-1065
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
libicu55
0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
Need to get 7650 kB of archives.
After this operation, 30.8 MB of additional disk space will be used.
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libicu55 amd64 55.1-7ubuntu0.5 [7650 kB]
Fetched 7650 kB in 3s (2575 kB/s)
Selecting previously unselected package libicu55:amd64.
(Reading database ... 335208 files and directories currently installed.)
Preparing to unpack .../libicu55_55.1-7ubuntu0.5_amd64.deb ...
Unpacking libicu55:amd64 (55.1-7ubuntu0.5) ...
Setting up libicu55:amd64 (55.1-7ubuntu0.5) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
3、安装EOS软件
root@ip-10-0-2-120:/data/coins/EOS# apt-get install ./eosio_2.0.6-1-ubuntu-16.04_amd64.deb -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'eosio' instead of './eosio_2.0.6-1-ubuntu-16.04_amd64.deb'
The following packages were automatically installed and are no longer required:
linux-aws-5.3-headers-5.3.0-1017 linux-aws-5.3-headers-5.3.0-1019 linux-aws-headers-4.15.0-1044 linux-aws-headers-4.15.0-1054 linux-aws-headers-4.15.0-1056 linux-aws-headers-4.15.0-1057 linux-aws-headers-4.15.0-1058 linux-aws-headers-4.15.0-1060
linux-aws-headers-4.15.0-1065
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
eosio
0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
Need to get 0 B/46.0 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /data/coins/EOS/eosio_2.0.6-1-ubuntu-16.04_amd64.deb eosio amd64 2.0.6-1 [46.0 MB]
Selecting previously unselected package eosio.
(Reading database ... 335229 files and directories currently installed.)
Preparing to unpack .../eosio_2.0.6-1-ubuntu-16.04_amd64.deb ...
Unpacking eosio (2.0.6-1) ...
Setting up eosio (2.0.6-1) ...
root@ip-10-0-2-120:/data/coins/EOS# nodeos -v
v2.0.6
4、下载EOS数据镜像
下载地址:https://snapshots-main.eossweden.org/
获取最新的镜像:
5、镜像数据倒入 (注意此时我们2.0后的版本不需要添加创世纪区块文件参数)
root@ip-10-0-2-120:/data/coins/EOS# wget https://snapshots-main.eossweden.org/snapshots/aca376/2.0/snapshot-113477189.bin.tar.gz
--2020-07-03 19:07:20-- https://snapshots-main.eossweden.org/snapshots/aca376/2.0/snapshot-113477189.bin.tar.gz
Resolving snapshots-main.eossweden.org (snapshots-main.eossweden.org)... 79.136.20.189
Connecting to snapshots-main.eossweden.org (snapshots-main.eossweden.org)|79.136.20.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 615027361 (587M) [application/x-gzip]
Saving to: ‘snapshot-113477189.bin.tar.gz’
snapshot-113477189.bin.tar.gz 100%[=================================================================================================================================================================>] 586.54M 11.0MB/s in 55s
2020-07-03 19:08:16 (10.6 MB/s) - ‘snapshot-113477189.bin.tar.gz’ saved [615027361/615027361]
root@ip-10-0-2-120:/data/coins/EOS# tar -xf snapshot-113477189.bin.tar.gz
root@ip-10-0-2-120:/data/coins/EOS# nodeos --data-dir ./data --config-dir ./ --snapshot snapshot-11
snapshot-111789659.bin.tar.gz snapshot-111828010.bin.tar.gz snapshot-112974791.bin.tar.gz snapshot-113477189.bin snapshot-113477189.bin.tar.gz
root@ip-10-0-2-120:/data/coins/EOS# nodeos --data-dir ./data --config-dir ./ --snapshot snapshot-113477189.bin
APPBASE: Warning: The following configuration items in the config.ini file are redundantly set to
their default value:
p2p-listen-endpoint, allowed-connection, signature-provider
Explicit values will override future changes to application defaults. Consider commenting out or
removing these items.
info 2020-07-03T11:09:00.012 nodeos chain_plugin.cpp:627 plugin_initialize ] initializing chain plugin
info 2020-07-03T11:09:00.012 nodeos chain_plugin.cpp:458 operator() ] Support for builtin protocol feature 'PREACTIVATE_FEATURE' (with digest of '0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd') is enabled without activation restrictions
info 2020-07-03T11:09:00.012 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'ONLY_LINK_TO_EXISTING_PERMISSION' (with digest of '1a99a59d87e06e09ec5b028a9cbb7749b4a5ad8819004365d02dc4379a8b7241') is enabled with preactivation required
info 2020-07-03T11:09:00.012 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'FORWARD_SETCODE' (with digest of '2652f5f96006294109b3dd0bbde63693f55324af452b799ee137a81a905eed25') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'WTMSIG_BLOCK_SIGNATURES' (with digest of '299dcb6af692324b899b39f16d5a530a33062804e41f09dc97e9f156b4476707') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'REPLACE_DEFERRED' (with digest of 'ef43112c6543b88db2283a2e077278c315ae2c84719a8b25f25cc88565fbea99') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'NO_DUPLICATE_DEFERRED_ID' (with digest of '4a90c00d55454dc5b059055ca213579c6ea856967712a56017487886a4d4cc0f') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'RAM_RESTRICTIONS' (with digest of '4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'WEBAUTHN_KEY' (with digest of '4fca8bd82bbd181e714e283f83e1b45d95ca5af40fb89ad3977b653c448f78c2') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'DISALLOW_EMPTY_PRODUCER_SCHEDULE' (with digest of '68dcaa34c0517d19666e6b33add67351d8c5f69e999ca1e37931bc410a297428') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'ONLY_BILL_FIRST_AUTHORIZER' (with digest of '8ba52fe7a3956c5cd3a656a3174b931d3bb2abb45578befc59f283ecd816a405') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'RESTRICT_ACTION_TO_SELF' (with digest of 'ad9e3d8f650687709fd68f4b90b41f7d825a365b02c23a636cef88ac2ac00c43') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'FIX_LINKAUTH_RESTRICTION' (with digest of 'e0fb64b1085cc5538970158d05a009c24e276fb94e1a0bf6a528b48fbc4ff526') is enabled with preactivation required
info 2020-07-03T11:09:00.013 nodeos chain_plugin.cpp:445 operator() ] Support for builtin protocol feature 'GET_SENDER' (with digest of 'f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d') is enabled with preactivation required
info 2020-07-03T11:09:01.316 nodeos platform_timer_accurac:62 compute_and_print_ti ] Checktime timer accuracy: min:17us max:191us mean:79us stddev:31us
info 2020-07-03T11:09:01.317 nodeos http_plugin.cpp:715 plugin_initialize ] configured http to listen on 0.0.0.0:9006
warn 2020-07-03T11:09:01.317 nodeos net_api_plugin.cpp:91 plugin_initialize ]
**********SECURITY WARNING**********
* *
* -- Net API -- *
* - EXPOSED to the LOCAL NETWORK - *
* - USE ONLY ON SECURE NETWORKS! - *
* *
************************************
info 2020-07-03T11:09:01.317 nodeos main.cpp:106 main ] nodeos version v2.0.6 v2.0.6-c6a7ec0dd816f98a6840f59dca9fed04efd9f7a5
info 2020-07-03T11:09:01.317 nodeos main.cpp:107 main ] nodeos using configuration file /data/coins/EOS/config.ini
info 2020-07-03T11:09:01.317 nodeos main.cpp:108 main ] nodeos data directory is /data/coins/EOS/./data
info 2020-07-03T11:09:01.317 nodeos controller.cpp:541 startup ] Starting initialization from snapshot, this may take a significant amount of time
^C
info 2020-07-03T11:13:03.654 nodeos controller.cpp:555 startup ] database initialized with hash: a67e1288b86fec33673fbb153ed10206fffb6388dd1d96fff05e4364e7c7996e
info 2020-07-03T11:13:03.671 nodeos controller.cpp:563 startup ] Finished initialization from snapshot
info 2020-07-03T11:13:03.677 nodeos chain_plugin.cpp:1162 plugin_startup ] starting chain in read/write mode
info 2020-07-03T11:13:03.677 nodeos chain_plugin.cpp:1170 plugin_startup ] Blockchain started; head block is #113477189
info 2020-07-03T11:13:04.038 nodeos main.cpp:149 main ] nodeos successfully exiting
6、启动eos服务
root@ip-10-0-2-120:/data/coins/EOS# nohup nodeos --data-dir ./data --config-dir ./ >> nodeos.log 2>&1 &
[1] 19999
7、查询nodeos是否启动成功
root@ip-10-0-2-120:/data/coins/EOS# netstat -antpu |grep nodeos
tcp 0 0 0.0.0.0:9006 0.0.0.0:* LISTEN 19999/nodeos
tcp 0 0 0.0.0.0:9876 0.0.0.0:* LISTEN 19999/nodeos
tcp 0 1 10.0.2.120:48832 104.26.9.20:49876 SYN_SENT 19999/nodeos
tcp 0 0 10.0.2.120:35678 46.4.80.50:9876 ESTABLISHED 19999/nodeos
tcp 0 0 10.0.2.120:38726 148.59.149.144:9876 ESTABLISHED 19999/nodeos
tcp 0 1 10.0.2.120:43404 34.222.255.167:80 SYN_SENT 19999/nodeos
tcp 0 0 10.0.2.120:42688 54.36.224.252:9876 ESTABLISHED 19999/nodeos
tcp 0 0 10.0.2.120:34598 148.251.183.205:9876 ESTABLISHED 19999/nodeos
tcp 0 1 10.0.2.120:51672 34.210.41.245:80 SYN_SENT 19999/nodeos
8、查询当前同步的区块高度
root@ip-10-0-2-120:/data/coins/EOS# cleos --url http://10.0.2.120:9006 get info
{
"server_version": "c6a7ec0d",
"chain_id": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",
"head_block_num": 113477556,
"last_irreversible_block_num": 113477225,
"last_irreversible_block_id": "06c3866927a6e3713a9810decea07caf166ad99ce52cad73cc95d44af0387498",
"head_block_id": "06c387b42590ea8001ce80c7a2494203ddf7b5ed128ecebd5ccb271c04fe146f",
"head_block_time": "2020-04-03T01:01:21.000",
"head_block_producer": "eosiomeetone",
"virtual_block_cpu_limit": 200000,
"virtual_block_net_limit": 1048576000,
"block_cpu_limit": 200000,
"block_net_limit": 1048576,
"server_version_string": "v2.0.6",
"fork_db_head_block_num": 113477556,
"fork_db_head_block_id": "06c387b42590ea8001ce80c7a2494203ddf7b5ed128ecebd5ccb271c04fe146f",
"server_full_version_string": "v2.0.6-c6a7ec0dd816f98a6840f59dca9fed04efd9f7a5"
}
至此我们的EOS2.0.6已经部署完毕