Ubuntu搭建EOS环境

Ubuntu版本 :  ubuntukylin-16.04-desktop-amd64.iso

EOS客户端 :  https://eosio.github.io/eos/   STAT-2017年12月21日

1.下载EOS

git clone https://github.com/eosio/eos --recursive
2. 执行自动化构建脚本(过程比较长)

cd eos
./build.sh ubuntu
3. 成功构建项目之后

在eos目录下  cd build/programs/eosd 运行 eosd- 它可能会退出一个错误,但如果没有,立即关闭它Ctrl-C请注意,eosd创建一个名为data-dir包含默认配置(config.ini)和其他内部的目录。这个默认的数据存储路径可以通过传递--data-dir /path/to/data覆盖eosd

在eosd的目录下 

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,如果出现以下报错

1519968ms            main.cpp:65                   main                 ] Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::exception_detail::clone_impl >
std::exception::what: option 'enable-stale-production' cannot be specified more than once

主要原因是config.ini文件里有两条 相同的   enable-stale-production  加入上面的内容设置    enable-stale-production 之前已经存在这个的设置  

添加复制的内容后多了一条 所以 用#号 注释掉一行  启用的值 设置成 true



再次启动eosd 成功启动

Ubuntu搭建EOS环境_第1张图片









你可能感兴趣的:(EOS.IO)