Ubuntu中怎么搭建EOS测试环境
发表于:2024-10-05 作者:千家信息网编辑
千家信息网最后更新 2024年10月05日,Ubuntu中怎么搭建EOS测试环境,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。1.下载源码git clone https://git
千家信息网最后更新 2024年10月05日Ubuntu中怎么搭建EOS测试环境
Ubuntu中怎么搭建EOS测试环境,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。
1.下载源码
git clone https://github.com/EOSIO/eos --recursive
遇到的问题以及解决方案如下:
问题:正克隆到 'test/emscripten'...remote: Counting objects: 109999, done.remote: Compressing objects: 100% (49/49), done.error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.fatal: The remote end hung up unexpectedlyfatal: 过早的文件结束符(EOF)fatal: index-pack failedfatal: 无法克隆 'https://github.com/kripken/emscripten.git' 到子模组路径 'test/emscripten'无法递归进子模组路径 'externals/binaryen'解决方案:造成无法克隆的原因是没有赋予root权限,执行命令cd eossudo git submodule update --init --recursive正确克隆结果:正克隆到 'test/emscripten'...remote: Counting objects: 109999, done.remote: Compressing objects: 100% (49/49), done.remote: Total 109999 (delta 31), reused 35 (delta 19), pack-reused 109929接收对象中: 100% (109999/109999), 159.40 MiB | 1.22 MiB/s, 完成.处理 delta 中: 100% (76465/76465), 完成.检查连接... 完成。子模组路径 'externals/binaryen/test/emscripten':检出 '1d979a75722a513b586e6705d662ff4ee0ea832b'正克隆到 'test/spec'...remote: Counting objects: 989, done.remote: Total 989 (delta 0), reused 0 (delta 0), pack-reused 989接收对象中: 100% (989/989), 605.07 KiB | 354.00 KiB/s, 完成.处理 delta 中: 100% (663/663), 完成.检查连接... 完成。子模组路径 'externals/binaryen/test/spec':检出 '668281b3d7dfe9be6cbc3c4500b537c49d6449b9'正克隆到 'test/waterfall'...remote: Counting objects: 2738, done.remote: Compressing objects: 100% (3/3), done.remote: Total 2738 (delta 0), reused 1 (delta 0), pack-reused 2735接收对象中: 100% (2738/2738), 680.70 KiB | 358.00 KiB/s, 完成.处理 delta 中: 100% (1993/1993), 完成.检查连接... 完成。子模组路径 'externals/binaryen/test/waterfall':检出 '900646fc880d526160b0df9b78bc9dd4f02dc1ab'正克隆到 'externals/magic_get'...remote: Counting objects: 2499, done.remote: Total 2499 (delta 0), reused 0 (delta 0), pack-reused 2499接收对象中: 100% (2499/2499), 532.04 KiB | 253.00 KiB/s, 完成.处理 delta 中: 100% (1775/1775), 完成.检查连接... 完成。子模组路径 'externals/magic_get':检出 '89fda1da702e6c76a22bfb6233e9e3d0641708ec'正克隆到 'libraries/appbase'...remote: Counting objects: 240, done.remote: Compressing objects: 100% (3/3), done.remote: Total 240 (delta 0), reused 1 (delta 0), pack-reused 237接收对象中: 100% (240/240), 62.12 KiB | 0 bytes/s, 完成.处理 delta 中: 100% (112/112), 完成.检查连接... 完成。子模组路径 'libraries/appbase':检出 '44d7d88e561cc9708bcac9453686c8d0f0ffa41e'正克隆到 'libraries/chainbase'...remote: Counting objects: 325, done.remote: Compressing objects: 100% (7/7), done.remote: Total 325 (delta 2), reused 8 (delta 2), pack-reused 315接收对象中: 100% (325/325), 68.23 KiB | 111.00 KiB/s, 完成.处理 delta 中: 100% (131/131), 完成.检查连接... 完成。子模组路径 'libraries/chainbase':检出 '94c54460bfa391aef6cadf1e3f8a4eb384c8b58e'正克隆到 'libraries/fc'...remote: Counting objects: 1652, done.remote: Compressing objects: 100% (3/3), done.remote: Total 1652 (delta 0), reused 1 (delta 0), pack-reused 1649接收对象中: 100% (1652/1652), 913.58 KiB | 107.00 KiB/s, 完成.处理 delta 中: 100% (850/850), 完成.检查连接... 完成。子模组路径 'libraries/fc':检出 'df5a17ef0704d7dd96c444bfd9a70506bcfbc057'正克隆到 'libraries/softfloat'...remote: Counting objects: 2579, done.remote: Total 2579 (delta 0), reused 0 (delta 0), pack-reused 2579接收对象中: 100% (2579/2579), 751.02 KiB | 150.00 KiB/s, 完成.处理 delta 中: 100% (2361/2361), 完成.检查连接... 完成。子模组路径 'libraries/softfloat':检出 '9dff375a6e3a9728a024b30afa127c88fcb40ea2'
2.编译
cd eos (若已经在eos目录,可省去这一步)./eosio_build.sh
一路通畅未遇到任何问题
编译完成,如图所示
3.环境验证(可不做)
请参照安装完成的图,执行验证的相关命令,
export PATH=${HOME}/opt/mongodb/bin:$PATH /home/guiren/opt/mongodb/bin/mongod -f /home/guiren/opt/mongodb/mongod.conf &cd /home/guiren/eos/buildmake test
验证结果
4.安装eos到系统环境
当期目录:eos
cd buildsudo make install
截图如下,
5.启动测试节点
当前目录:eos/build
cd programs/nodeos/./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin
启动成功文案如下
2018-07-24T10:07:21.999 thread-0 chain_plugin.cpp:271 plugin_initialize ] initializing chain plugin2018-07-24T10:07:22.000 thread-0 chain_plugin.cpp:508 plugin_initialize ] Starting up fresh blockchain with default genesis state.CHAINBASE: Failed to pin chainbase shared memory (of size 1024 MB) in RAM. Performance degradation is possible.CHAINBASE: Failed to pin chainbase shared memory (of size 340 MB) in RAM. Performance degradation is possible.2018-07-24T10:07:22.201 thread-0 http_plugin.cpp:344 plugin_initialize ] configured http to listen on 127.0.0.1:88882018-07-24T10:07:22.201 thread-0 net_plugin.cpp:2941 plugin_initialize ] Initialize net plugin2018-07-24T10:07:22.201 thread-0 net_plugin.cpp:2966 plugin_initialize ] host: 0.0.0.0 port: 9876 2018-07-24T10:07:22.202 thread-0 net_plugin.cpp:3036 plugin_initialize ] my node_id is e76f8b8955b7944588c11d4c97fbd649c5e18bb1f5adddc306797ba4a2f3cdc82018-07-24T10:07:22.202 thread-0 main.cpp:105 main ] nodeos version 756351682018-07-24T10:07:22.202 thread-0 main.cpp:106 main ] eosio root is /home/guiren/.local/share2018-07-24T10:07:22.202 thread-0 controller.cpp:1252 startup ] No head block in fork db, perhaps we need to replay2018-07-24T10:07:22.202 thread-0 controller.cpp:319 initialize_fork_db ]
出现和上面类似的文案,说明已经在生产块了。
6.执行cleos命令查看相关信息
重新打开一个终端(之前生产节点的终端不要关闭)
当前目录:eos
cd build/programs/cleos./cleos get info (查看网络信息)
网络信息如下,
cleos命令官方文档:https://developers.eos.io/eosio-cleos/reference#cleos-version
生成的块和配置信息默认在当前登录用户目录,
cd .local/share/eosio/nodeos/
删除这个目录,重启nodeos即可重置账号,智能合约等。
笔者建议各位开发人员将已经搭建好的eos压缩一份保存起来,下次可直接拿来使用,毕竟搭建环境也是个费时的过程。
打包到root目录命令,
tar -zcvf ~/eos_nodes_backup.tar.gz eos
看完上述内容,你们掌握Ubuntu中怎么搭建EOS测试环境的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注行业资讯频道,感谢各位的阅读!
模组
路径
对象
处理
检查
目录
环境
命令
问题
信息
测试
验证
内容
原因
文案
方案
方法
更多
终端
结果
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全员破解支付宝
文登数据库修复
奥维服务器链接数据库
按键精灵如何修改表格数据库
cs架构 数据库
用友软件开发人天价格
安全软件开发涉及的标准
jsp连不上数据库
深圳三职计算机网络技术
数据库如何保存oss地址
服务器端口号四位的安全吗
黑狐网络软件开发工作室
数据库sql 唯一约束
mysql数据库左右连接
环保软件开发的前景
创造与魔法去哪个服务器比较好
商丘网络技术销售价格
从数据库删除一万条数据
瀚文民国书库数据库
广州白云区企浪网络技术有限公司
武汉oa软件开发哪家好
手机网络安全小达人
数据库连接错误12557
cs架构 数据库
为什么黎明觉醒现在进不去服务器
数据库数据太大了怎么处理
网络安全法案例三十字
存储服务器数据流存储过程
各种数据库连接组件
俄罗斯网络安全宣传片