출처 : https://medium.com/returnvalues/libra-core-설치-및-테스트넷-연결-55d4e92d8319

 

고승원님 포스팅 보고 나도 시작해볼까 했는데

한 3일 정도 걸린거 같다.

 

Mac OS에서는 쉽게 되는거 같은데 docker 에서는 완전 쉽지 않다.

ubuntu 18

root@9bb88386f44f:/etc# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l

root@9bb88386f44f:/etc

 

 

 

내가 Docker를 쓴지가 얼마 안되었다.

위 버전은 안되고 미안하게도 Icon 공모전 중이라 Icon이미지에 libra를 설치 했다.

docker run -it -p 127.0.0.1:9000:9000 -p 127.0.0.1:5000:5000 --rm ubuntu:latest

docker run -it -p 127.0.0.1:9000:9000 -p 127.0.0.1:5000:5000 --rm ibriz/icon-workshop:latest  

위 명령어가 실행 안되면

리스타트를 하고 다 올라 올때까지 3분 정도 기다려야 된다.

 

 

윈도우 Docker에서 램을 6기가 이상으로 잡아야 된다.

나중에 램 용량 모자른다고 메세지 뜨기도 한다.

rm 옵션을 줘서 Docker를 한번 닫으면 처음부터 다시 해야된다.

 

우선 apt 연결을 위해

/etc/apt/sources.list 바꾸기

#+ Ubuntu Main Repos

deb http://mirror.kakao.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirror.kakao.com/ubuntu/ trusty main restricted universe multiverse

 


#+ Ubuntu Update Repos

deb http://mirror.kakao.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirror.kakao.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirror.kakao.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirror.kakao.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirror.kakao.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ubuntu bionic main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ubuntu bionic-security main restricted universe multiverse

deb http://mirror.kakao.com/ubuntu/ubuntu bionic-updates main restricted universe multiverse

 

 

경로 바꾸었으니 적용을 해야 된다.

 apt-get update

기타 등등 설치

 apt install -y curl
apt install  -y sudo
apt install -y rustc cargo
apt install -y unzip
apt install -y g++
apt install -y wget
apt-get install -y binutils-2.26
apt install zlib1g-dev


apt-get install build-essential libtool autotools-dev automake pkg-config ... qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev

스택 오버플로우 뒤저가면 찾아 온것들이다.

dependency 엄청 타는거 같았다.

 

난 root디렉토리에 머 설치하는걸 좋아한다.

/usr/local/src가 리눅스에서는 라이브러리 공식이긴한데 ㅎ

 

go언어와 make를 설치한다 이것도 버전탄다.

cd /root 

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


wget https://cmake.org/files/v3.8/cmake-3.8.0-rc1.tar.gz

cd cmake-3.8.0-rc1
./bootstrap
make
make install

 

환경변수에 넣고 실행 한다.

.profile 아래 부분에 추가

export CMAKE_ROOT=~/cmake-3.8.0-rc1
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin

source .profile
env확인

 

root디렉토리에서 바로 설치 한다.

 

git clone https://github.com/libra/libra.git
./scripts/dev_setup.sh 

Finished installing all dependencies.

You should now be able to build the project by running:

source /root/.cargo/env
cargo build 

 

 

이제 끝이다.

Building and running client in debug mode.# ls
cargo_check_dependencies.sh  cargo_update_outdated.sh  cli  clippy.args  clippy.sh  dev_setup.sh  nightly_features.sh
root@9bb88386f44f:~/libra/scripts# cd cli
root@9bb88386f44f:~/libra/scripts/cli# ls
start_cli_testnet.sh  trusted_peers.config.toml
root@9bb88386f44f:~/libra/scripts/cli# ./start_cli_testnet.sh
Building and running client in debug mode. 

 

 

 

정말 적고 보니  양도 얼마 안되고 허무하다.

삽질 정말 많이 했었는데,,

 

블로그 이미지

iesay

,