以太坊开发环境搭建(go+geth+ganache+remix)

一:环境说明

1.ubuntu16.04 64位
2.golang (1.10.3)
3.geth (1.8.12)
4.ganache (ganache-1.2.1-x86_64.AppImage)
5.remix

二:安装golang、安装geth

参见以太坊单节点私链搭建(go+geth+Etherum Wallet) 博文中的 【二:安装golang】、【三:安装geth】

三:安装ganache

官网:https://truffleframework.com/ganache
下载:https://github.com/trufflesuite/ganache/releases
(本文下载的ganache-1.2.1-x86_64.AppImage)
将下载后的文件ganache-1.2.1-x86_64.AppImage重命名为ganache,并放置到/usr/local/ganache1.2.1/目录下
增环境变量配置(vi /etc/profile):

...
#ganache
export GANACHE_HOME=/usr/local/ganache1.2.1
export PATH=$PATH:$GANACHE_HOME

更新

> source /etc/profile

命令行下,启动ganache

> ganache

四:安装remix

安装依赖npm 、nvm、node

nvm 是一个node 版本工具,我们可以使用nvm来安装不同版本的node。
因为Remix IDE 要求使用node 7.10.1, 这里我们安装node 7

安装npm:

> sudo apt-get install npm

安装nvm:

> curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

并在/etc/profile文件中追加配置:

...
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

更新

> source /etc/profile

安装node:

> nvm install 7

安装完成之后,使用node –version 和 npm –version检查下版本号

安装Remix ide:

> npm install remix-ide -g
> remix-ide  # 启动

五:Remix ide 使用

Remix IDE 默认是使用8080端口启动的,启动之后在浏览器打开:http://localhost:8080/, 如图:
这里写图片描述

参考博文:http://www.cnblogs.com/tinyxiong/p/9207132.html

猜你喜欢

转载自blog.csdn.net/apple9005/article/details/81222287
今日推荐