Blockchain

[Blockchain] 하이퍼레저 패브릭(Hyperledger Fabric) 환경 구성

구루싸 2021. 7. 6. 07:57
반응형
SMALL

1. VirtualBox 설치

  • 버추얼박스는 Oracle에서 개발한 가상화 소프트웨어다.
 

Downloads – Oracle VM VirtualBox

Download VirtualBox Here you will find links to VirtualBox binaries and its source code. VirtualBox binaries By downloading, you agree to the terms and conditions of the respective license. If you're looking for the latest VirtualBox 6.0 packages, see Virt

www.virtualbox.org

2. Vagrant 설치

  • 베이그런트는 Mitchell Hashimoto(HashiCorp 설립자)가 개발한 버추얼박스 등의 가상화 소프트웨어 및 구성 관리 도구를 쉽게 다루기 위한 도구이다.
 

Vagrant by HashiCorp

Vagrant enables users to create and configure lightweight, reproducible, and portable development environments.

www.vagrantup.com

3. 가상화 게스트 OS로 Ubuntu 설치

  • 베이그런트 사용하지 않을 경우에는 Ubuntu ISO 이미지를 다운로드한 후 설치한다.
 

Download Ubuntu Desktop | Download | Ubuntu

Ubuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.

ubuntu.com

4. docker 및 docker-compose 설치

sudo apt update

sudo apt upgrade

sudo apt -y install apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg |

sudo apt-key add -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \

 $(lsb_release -cs) stable"

sudo apt update

sudo apt -y install docker-ce

sudo usermod -a -G docker $USER

sudo apt -y install docker-compose 

sudo systemctl start docker

sudo systemctl enable docker

5. Python 2.7 설치

sudo apt -y install python

6. Golang 및 관련 도구 설치

wget https://dl.google.com/go/go1.16.7.linux-amd64.tar.gz 

sudo tar -C /usr/local -xzf go1.16.7.linux-amd64.tar.gz

echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile

source ~/.profile

7. Node.js, npm 설치

sudo apt install nodejs

sudo apt install npm

8. GNU make, gcc/g++, libtool 설치

sudo apt -y install make gcc g++ libtool

9. 하이퍼레저 패브릭 설치 및 동작 확인

9.1. CLI와 도커 컨테이너 설치

mkdir -p $HOME/fabric

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

echo 'export PATH=$PATH:$HOME/fabric/fabric-samples/bin' >> ~/.profile

source ~/.profile

docker images --format "table {{.Repositoy}}\t{{.Tag}}\t{{.Size}}"

9.2. 공식 예제 다운로드

git clone https://github.com/hyperledger/fabric-samples.git -b v1.4.0

반응형
LIST