LoginSignup
1
0

More than 5 years have passed since last update.

スマートコントラクトの開発

Last updated at Posted at 2017-05-13

環境構築についての設定

概要

Ethereumの開発ではクライアントとしてGethを用いる

Ⅰ.はじめに

Gethのインストールを実行

【MacOSの場合】

MacでGethをインストールする場合はHomebrewを使うと簡単です。
なお、Homebrewは以下のサイトでインストールをすることができます。

上記のサイトにログインすると、インストールに必要なコマンドがでてくるので、
それをターミナルへ直接入力します。

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Homebrewをインストールした状態で、ターミナルで以下のコマンドを打ち込む。

$ brew tap ethereum/ethereum
$ brew install ethereum

インストールを完了後

geth account new

これでnodeを作成することができる。「Gethの準備が完了」
ターミナルで

geth 

と打ち込めばGethが立ち上がる。(現時点では実行不要)

Ⅱ.ソースからビルドする

任意のディレクトリに以下のレポジトリをクローンする

$ git clone https://github.com/ethereum_go-ethereum

すると、

Cloning into 'go-ethereum'...
remote: Counting objects: 61884, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 61884 (delta 3), reused 0 (delta 0), pack-reused 61876
Receiving objects: 100% (61884/61884), 84.04 MiB | 775.00 KiB/s, done.
Resolving deltas: 100% (41112/41112), done.
Checking connectivity... done.
Checking out files: 100% (2810/2810), done.

とでてくるので、これが出て来ればクローン完了です。

なお、homebrewにおけるヘルプコマンドは

brew -h

上記のコマンドで確認することができます。
その際に確認できる内容は以下の通りです。

Example usage:
brew search [TEXT|/REGEX/]
brew (info|home|options) [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...]

Troubleshooting:
brew config
brew doctor
brew install -vd FORMULA

Developers:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
http://docs.brew.sh/Formula-Cookbook.html

Further help:
man brew
brew help [COMMAND]
brew home

なお、Homebrewの公式HPには、
各種バイナリがありますので、必要に応じて確認してください。

1
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
1
0