EOS币服务安装

1、下载币服务数据,减少同步的时间,

1.8版本的数据

https://snapshots-main.eossweden.org/

https://snapshots-main.eossweden.org/snapshots/aca376/1.8/snapshot-107270581.bin.tar.gz

2.0版本的数据

https://snapshots.bossweden.org/

https://snapshots.bossweden.org/snapshots/4d2d1d/2.0/snapshot-73077440.bin.tar.gz

下载地址如下:wget http://snapshots.eossweden.org/snapshots/aca376/1.8/snapshot-89921661.bin.tar.gz

root@host:/data/coins# wget http://snapshots.eossweden.org/snapshots/aca376/1.8/snapshot-89921661.bin.tar.gz
--2019-11-21 15:23:32--  http://snapshots.eossweden.org/snapshots/aca376/1.8/snapshot-89921661.bin.tar.gz
Resolving snapshots.eossweden.org (snapshots.eossweden.org)... 176.10.159.81
Connecting to snapshots.eossweden.org (snapshots.eossweden.org)|176.10.159.81|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 576279827 (550M) [application/x-gzip]
Saving to: ‘snapshot-89921661.bin.tar.gz’

snapshot-89921661.bin.tar.gz                                        100%[=================================================================================================================================================================>] 549.58M  7.98MB/s    in 75s     

2019-11-21 15:24:48 (7.31 MB/s) - ‘snapshot-89921661.bin.tar.gz’ saved [576279827/576279827]

2、上传三个文件,配置文件、json、启动脚本三个文件,此时服务器目录下的文件如下

其中EOS的json文件下载路径如下

wget https://github.com/EOS-Mainnet/eos/raw/mainnet-1.0.5/mainnet-genesis.json

config.ini  genesis.json start.sh

root@host:/data/coins/EOS# ls
config.ini  genesis.json  snapshot-89921661.bin.tar.gz  start.sh

3、解压数据文件

root@host:/data/coins/EOS# tar -xf snapshot-89921661.bin.tar.gz 
root@host:/data/coins/EOS# ls
config.ini  genesis.json  snapshot-89921661.bin  snapshot-89921661.bin.tar.gz  start.sh

4、安装nodeos工具

1)、Ubuntu 16.04 Package Install

root@host:/data/coins/EOS# wget https://github.com/eosio/eos/releases/download/v1.8.6/eosio_1.8.6-1-ubuntu-16.04_amd64.deb
root@host:/data/coins/EOS# sudo apt install ./eosio_1.8.6-1-ubuntu-16.04_amd64.deb

2)、Ubuntu 18.04 Package Install

root@host:/data/coins/EOS# wget https://github.com/eosio/eos/releases/download/v1.8.6/eosio_1.8.6-1-ubuntu-18.04_amd64.deb
root@host:/data/coins/EOS# sudo apt install ./eosio_1.8.6-1-ubuntu-18.04_amd64.deb

3)、Centos RPM Package Install

[root@host ~]# wget https://github.com/eosio/eos/releases/download/v1.8.6/eosio-1.8.6-1.el7.x86_64.rpm
[root@host ~]# sudo yum install ./eosio-1.8.6-1.el7.x86_64.rpm

5、导入数据

root@ip-10-0-3-80:/data/coins/EOS# nodeos --data-dir ./data --config-dir ./ --genesis-json genesis.json --snapshot snapshot-89921661.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  2019-11-21T07:34:15.859 nodeos    chain_plugin.cpp:556          plugin_initialize    ] initializing chain plugin
info  2019-11-21T07:34:15.859 nodeos    chain_plugin.cpp:395          operator()           ] Support for builtin protocol feature 'RAM_RESTRICTIONS' (with digest of '4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67') is enabled with preactivation required
info  2019-11-21T07:34:15.859 nodeos    chain_plugin.cpp:505          operator()           ] Saved default specification for builtin protocol feature 'RAM_RESTRICTIONS' (with digest of '4e7bf348da00a945489b2a681749eb56f5de00b900014e137ddae39f48f69d67') to: /data/coins/EOS/./protocol_features/BUILTIN-RAM_RESTRICTIONS.json
info  2019-11-21T07:34:15.859 nodeos    chain_plugin.cpp:395          operator()           ] Support for builtin protocol feature 'GET_SENDER' (with digest of 'f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d') is enabled with preactivation required
info  2019-11-21T07:34:15.859 nodeos    chain_plugin.cpp:505          operator()           ] Saved default specification for builtin protocol feature 'GET_SENDER' (with digest of 'f0af56d2c5a48d60a4a5b5c903edfb7db3a736a94ed589d0b797df33ff9d3e1d') to: /data/coins/EOS/./protocol_features/BUILTIN-GET_SENDER.json

到出现以下内容是数据导入成功,即可kill掉进程

 6、启动进程

root@host:/data/coins/EOS# nohup nodeos --data-dir ./data --config-dir ./ >> nodeos.log 2>&1 &
[1] 22473

root@host:/data/coins/EOS# netstat -antpu |grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      22473/nodeos   
root@host:/data/coins/EOS# ps -ef |grep node
root     22473 21594 88 15:37 pts/1    00:19:45 nodeos --data-dir ./data --config-dir ./

当版本升级时遇到版本异常报错的问题时我们可以执行以下命令

nohup nodeos --data-dir /data/coins/EOS/data --config-dir /data/coins/EOS/data --hard-replay --wasm-runtime wabt &

当我们重启时出现一下报错时,解决的办法如下

 加上--hard-replay的参数

nodeos --data-dir /data/coins/EOS/data --config-dir /data/coins/EOS/data/ --genesis-json /data/coins/EOS/data/genesis.json --hard-replay >> nodeos.log 2>&1 &
发布了161 篇原创文章 · 获赞 69 · 访问量 25万+

猜你喜欢

转载自blog.csdn.net/baidu_38432732/article/details/103183793
今日推荐