您的位置:首页 > 编程语言 > Go语言

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

2017-01-19 10:52 691 查看
第一、先安装geth的CLI环境
sudo apt-get install geth,这个很重要
第二、下载源代码
git clone https://github.com/ethereum/go-ethereum[/code] 第三、依赖环境
注:(重要)先通过此链接配置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
[code]cd go-ethereummake geth
最后输入:
build/bin/geth --datadir "~/ethdev" --dev启动客户端[/code]
然后另起终端输入
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语言环境可以参考我的博客
[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: