LoginSignup
2
0

More than 5 years have passed since last update.

Docker Ubuntu Ethereum採掘

Posted at

Ubuntuのイメージをダウンロード

まずは、dockerからubuntuのイメージをダウンロードします。

$ doncker pull ubuntu
$ docker run ubuntu
$ docker run -it -d --name ubuntu-ethereum ubuntu:16.04
$ docker exec -it ubuntu-ethereum /bin/sh

ここからはubuntuのターミナルの中で行う作業と同じです。

# apt-get install golang
# apt-get install software-properties-common
# add-apt-repository -y ppa:ethereum/ethereum
# apt-get update
# apt-get install ethereum
# apt-get update
# apt-get upgrade

ファイルを編集するvimをインストール

# apt-get install vim
# vim myGenesis.json 

以下のファイルを作成します。

myGenesis.json
{
  "config": {
    "chainId": 15
  },
  "nonce": "0x0000000000000042",
  "timestamp": "0x0",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "extraData": "",
  "gasLimit": "0x8000000",
  "difficulty": "0x4000",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x3333333333333333333333333333333333333333",
  "alloc": {}
}

ESCを押して、shift + zzで保存して終了。

ジェネシスブロックの作成

# geth --datadir eth_private_net init myGenesis.json

プライベートネットに接続

# geth --networkid "15" --nodiscover --datadir "eth_private_net" console 2>> ./geth_err.log

ここまできたらこちらの記事を参考に採掘をしてみてください。
Ethereum [etherの採掘]

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0