본문 바로가기
Blockchain

HyperLedger Fabric WSL 설치

by 임아톰 2021. 8. 14.

Window10 WSL Ubuntu 20.04 LTS에서 진행하였습니다.

 

WSL 설치

Windows 10에 Linux용 Windows 하위 시스템 설치 가이드

 

WSL 설치 후

sudo apt-get update && sudo apt-get upgrade

 

git 설치

sudo apt-get install git

 

Docker, Docker Compose 설치

Docker Desktop을 설치

 

설치 완료되면 설정- 일반에서 "Use the WSL 2 based engine"이 체크되어있는지 확인(안 돼있으면 체크)

 

Resources - WSL INTEGRATIOn에서 Ubuntu-20.04가 활성화되어있는지 확인.

활성화하고 Apply & Restart

 

도커 설치 확인

docker version

 

curl 설치

sudo apt-get install curl
curl -V

 

node.js 설치

sudo apt-get update 
sudo apt-get install build-essential libssl-dev
curl -sL http://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
bash install_nvm.sh 
source ~/.profile
nvm install v12.18.3
node -v
npm -v

 

golang 설치

wget https://dl.google.com/go/go1.15.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.15.1.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/profile
echo 'export GOPATH=$HOME/go' | tee -a $HOME/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' | tee -a $HOME/.bashrc
go version

 

Install Samples, Binaries, and Docker Images

아래의 명령어로 원하는 디렉토리에 fabric-samples를 설치

curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.2.0 1.4.7

curl -sSL https://bit.ly/2ysbOFE | bash -s -- <fabric_version> <fabric-ca_version>으로 특정 버전을 설치.

여기서는 LTS 버전인 v2.2.0을 설치한 것

 

설치가 완료되었습니다.

Using the Fabric test network 튜토리얼을 진행하여 설치가 제대로 됐는지 확인해봅니다.

 

cd fabric-samples/test-network

 

./network.sh up createChannel

network와 채널이 잘 생성되면 설치가 잘 된 것입니다.

 

reference

HyperLeger FABRIC Docs Getting Started

HyperLedger - Fabric on Windows 10

반응형