EOS开发(一)Ubuntu搭建EOS环境

EOS客户端 : https://eosio.github.io/eos/
1.下载EOS

git clone https://github.com/eosio/eos --recursive

2 执行自动化构建脚本(过程比较长)

>cd eos
>./build.sh ubuntu
或者输入
>./eosio-build.sh ubuntu
根据下载的版本确定

3.成功构建项目之后
在eos目录下 cd build/programs/eosid 运行 eosid- 它可能会退出一个错误,但如果没有,立即关闭它Ctrl-C。请注意,eosid创建一个名为data-dir包含默认配置(config.ini)和其他内部的目录。这个默认的数据存储路径可以通过传递–data-dir /path/to/data来覆盖eosid。
在eosid的目录下
cd /data-dir
nano config.ini
按照官方给的操作:
编辑config.ini文件,将以下设置添加/更新为已有的默认值:

# Load the testnet genesis state, which creates some initial block producers with the default key
genesis-json = /path/to/eos/source/genesis.json   这里的路径按照自己ubuntu里的genesis.json文件的实际路径设置
 # Enable production on a stale chain, since a single-node test chain is pretty much always stale
enable-stale-production = true
# Enable block production with the testnet producers
producer-name = inita
producer-name = initb
producer-name = initc
producer-name = initd
producer-name = inite
producer-name = initf
producer-name = initg
producer-name = inith
producer-name = initi
producer-name = initj
producer-name = initk
producer-name = initl
producer-name = initm
producer-name = initn
producer-name = inito
producer-name = initp
producer-name = initq
producer-name = initr
producer-name = inits
producer-name = initt
producer-name = initu
# Load the block producer plugin, so you can produce blocks
plugin = eosio::producer_plugin
# Wallet plugin
plugin = eosio::wallet_api_plugin
# As well as API and HTTP plugins
plugin = eosio::chain_api_plugin
plugin = eosio::http_plugin

现在应该可以运行eosd,如下图:
这里写图片描述
你配置的EOS区块链成功了。

猜你喜欢

转载自blog.csdn.net/jambeau/article/details/79207949