基于Ubuntu系统搭建以太坊go-ethereum源码的开发环境


第一、先安装geth的CLI环境sudo apt-get install geth,这个很重要

第二、下载源代码

git clone https://github.com/ethereum/go-ethereum
第三、依赖环境

注:(重要)先通过此链接配置GO语言的开发环境:https://github.com/ethereum/go-ethereum/wiki/Installing-Go#ubuntu-1404
Ethereum Go是使用Go语言开发的,需要Go和C的编译器
sudo apt-get install -y build-essential golang


cd go-ethereum
make geth

最后输入:

build/bin/geth --datadir "~/ethdev" --dev

启动客户端


然后另起终端输入

geth --dev console 2>> file_to_log_output

输出

Welcome to the Geth JavaScript console!

instance: Geth/v1.5.7-stable-da2a22c3/linux/go1.7.3
 modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0

>

即为成功

然后就可以进行以太坊命令操作



也可已使用build/bin/geth --identity "secbro etherum" --rpc --rpccorsdomain "*" --datadir "/home/zero/eth/chain" --port "30303" --rpcapi "db,eth,net,web3" -- networkid 95518 console --dev创建私有连,创世块

最后配置Go语言环境可以参考我的博客

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值