首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

兄弟连区块链教程ethereumpool矿池源码分析环境安装

兄弟连区块链教程open-ethereum-pool矿池源码分析环境安装,2018年下半年,区块链行业正逐渐褪去发展之初的浮躁、回归理性,表面上看相关人才需求与身价似乎正在回落。但事实上,正是初期泡沫的渐退,让人们更多的关注点放在了区块链真正的技术之上。

# open-ethereum-pool以太坊矿池-环境安装

## 安装Geth

```shell

//安装parity

cd /tmp/

wget d1h4xl4cr1h0mo.cloudfront.net/v1.8.11/x86_64-unknown-linux-gnu/parity_1.8.11_ubuntu_amd64.deb

dpkg -i parity_1.8.11_ubuntu_amd64.deb

//安装screen

apt-get update

apt-get -y install screen

//启动parity

screen parity --base-path=/root/.ethereum --chain ropsten --jsonrpc-interface local --jsonrpc-hosts all --jsonrpc-apis all --no-ws --no-dapps --author 0xc1d0932D18a4Ec35728b7fF02288dF745D1f4F40

//暂时离开 按住Ctrl,依次再按a,d

//恢复screen会话

screen -ls

screen -r 17172

//安装Geth

apt-get -y install software-properties-common

add-apt-repository -y ppa:ethereum/ethereum

apt-get update

apt-get -y install ethereum

//启动Geth连接parity

geth attach 127.0.0.1:8545

//区块同步进展

> eth.syncing

//查账户余额

> eth.getBalance("0xc1d0932D18a4Ec35728b7fF02288dF745D1f4F40")

//getBlock

> eth.getBlock('pending')

//getWork

> eth.getWork()

```

## open-ethereum-pool矿池安装

```shell

//go >= 1.9

//geth or parity

//redis-server >= 2.8.0

//nodejs >= 4 LTS

//nginx

//安装go

wget dl.google.com/go/go1.9.4.linux-amd64.tar.gz

tar -zxvf go1.9.4.linux-amd64.tar.gz

mv go /usr/local/

ln -s /usr/local/go/bin/go /usr/bin/go

go version

//安装redis-server

apt-get -y install redis-server

//安装nodejs

curl -sL deb.nodesource.com/setup_8.x | sudo -E bash -

apt-get install -y nodejs

npm config set registry registry.npm.taobao.org

//安装nginx

apt-get -y install nginx

//安装open-ethereum-pool

cd /root/

git config --global http.gopkg.in.followRedirects true

git clone github.com/sammy007/open-ethereum-pool.git

cd open-ethereum-pool

make

//运行open-ethereum-pool

cd /root/open-ethereum-pool/

screen ./build/bin/open-ethereum-pool config.json

//运行unlocker

screen ./build/bin/open-ethereum-pool unlock.json

```

## 运行www

```shell

cd /data/

//修改www/config/environment.js

vim www/config/environment.js

ApiUrl: '//106.15.89.134/',

HttpHost: '106.15.89.134',

StratumHost: '106.15.89.134',

//编译www

cd www

npm install -g ember-cli@2.9.1

npm install -g bower

sudo npm install

bower install --allow-root

./build.sh

//配置nginx

vim /etc/nginx/sites-available/default

upstream api {

server 127.0.0.1:8080;

}

root /data/www/dist;

//放在location /:之后

location /api {

proxy_pass;

}

//重启nginx

service nginx restart

```

## 使用ethminer测试open-ethereum-pool

```shell

//下载地址github.com/ethereum-mining/ethminer/releases/download/v0.14.0.dev2/ethminer-0.14.0.dev2-Windows.zip

//解压至C:\ethminer

//启动

cd c:\ethminer\bin

ethminer.exe -G -F 106.15.89.134:8888/0x1DD1a1681285E09A46a69A14b010Cf846511da90

```

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20181015A13L5H00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券