LoginSignup
3
1

More than 5 years have passed since last update.

VM上のubuntuでfactomを起動する

Posted at

factomとは

ビットコイン2.0プロジェクトの一環としてfactomプロジェクトも立ち上がりました。
ブロックチェーンの実装です。今回はその使用感を確かめるべくインストールしたのでその手順をしめします。

手順

流れ

  1. VMWareにubuntuをインストールする
  2. factomをインストールする
  3. サンドボックスサーバの設定を行う
  4. factomを起動する

VMWareにubuntuをインストールする

ここはたくさん資料があるので説明を簡単に済ませます。

  1. ダウンロード VMware Workstation PlayerからVMwareをダウンロードしてインストールしてください。
  2. 日本語版Ubuntuの入手からubuntuのisoイメージをダウンロードしてください。
  3. VMwareで新しい仮想マシンを建てて、ubuntuをインストールしてください。

factomをインストールする

  1. 端末を起動します。
  2. gitをインストールします。sudo apt-get install gitを実行してください。 image.png
  3. 同じ要領で以下を実行していきましょう。
cd ダウンロード
wget https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# install glide, the package dependency manager
go get -u github.com/Masterminds/glide
# download the code
git clone https://github.com/FactomProject/factomd $GOPATH/src/github.com/FactomProject/factomd
git clone https://github.com/FactomProject/factom-cli $GOPATH/src/github.com/FactomProject/factom-cli
git clone https://github.com/FactomProject/factom-walletd $GOPATH/src/github.com/FactomProject/factom-walletd
git clone https://github.com/FactomProject/enterprise-wallet $GOPATH/src/github.com/FactomProject/enterprise-wallet

# To use the unstable development branch, uncomment these lines
# This is primarily for developers who are updating factom itself
# Leave alone to get the tested, released version.
cd $GOPATH/src/github.com/FactomProject/factomd
# git checkout develop
cd $GOPATH/src/github.com/FactomProject/factom-cli
# git checkout develop
cd $GOPATH/src/github.com/FactomProject/factom-walletd
# git checkout develop
cd $GOPATH/src/github.com/FactomProject/enterprise-wallet
# git checkout develop

# get the dependencies and build each factom program
glide cc
cd $GOPATH/src/github.com/FactomProject/factomd
glide install
go install -v -ldflags "-X github.com/FactomProject/factomd/engine.Build=`git rev-parse HEAD`"
cd $GOPATH/src/github.com/FactomProject/factom-cli
glide install
go install -v
cd $GOPATH/src/github.com/FactomProject/factom-walletd
glide install
go install -v
cd $GOPATH/src/github.com/FactomProject/enterprise-wallet
glide install
go install -v
cd $GOPATH/src/github.com/FactomProject/factomd

# done.  factomd should be installed
# you can optionally use a config file to run in a non-standard mode
# mkdir -p ~/.factom/m2/
# cp $GOPATH/src/github.com/FactomProject/factomd/factomd.conf ~/.factom/m2/

#の行は実行しなくていいです。

これでインストールは完了です!

サンドボックスサーバの設定を行う

ローカルのみの限られた範囲で起動できるように設定ファイルの内容を書き換えます。
homeの.factom/m2/factomd.confを以下のように変更してください。
image.png

image.png

factomを起動する

端末でfactomdと打ち込めば起動します。

http://localhost:8090/
にブラウザからアクセスして
image.png
↑のような画面が出てくればOKです。

使い方

https://docs.factom.com/cli
↑を参考にしてください。(いずれ使い方の記事も書くかも。)

参考

ブロックチェーンを応用したデータの存在証明を Factom でやってみる
FactomDocs - GitHub
Community Tester Install Guide for Factom Federation (M2)

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