要点: 要使用 linux 最新版本, 笔者使用 centos6.8 安装不了, 只好升级到 7.5 了
1. 克隆代码 : git clone https://github.com/EOSIO/eos --recursive
如果没有使用 --recursive 选项, 运行下面的命令: git submodule update --init --recursive
2. cd eos && ./eosio_build.sh
安装过程中遇到询问, 填 1 安装否则就终止了
3. 中间会遇到下载 mongo3.6.3 超时的问题, 需要修改脚本中的下载部分, 将 https 改成 http:
- #vim scripts/eosio_build_centos.sh line 408
- STATUS=$(curl -LO -w '%{http_code}' --connect-timout 30 https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz)
更改下载链接的协议: https==> http
STATUS=$(curl -LO -w '%{http_code}' --connect-timout 30 http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.6.3.tgz)
这个处理方法时候我在网上找到的, 不记得是哪位大神, 表示感谢!
4. 接下来继续安装没什么问题, 配置文件在 Docker 目录下, 第一次启动参数写错了, 出了问题. 结果后来怎么弄都不行, 会出现下面的错误提示:
Block log was not setup properly with genesis information
- Failed to initialize
- nodeos thread-0 chain_plugin:cpp:206
本来想到可能是缓存的问题, 可是没找到, 猜测是不是没有缓存, 后来翻墙才确定是缓存问题
rm -rf ~/.local/share/eosio/nodeos/data
删除后一切正常了!!
来源: http://www.jianshu.com/p/5a1c64cd40c6