Ripple协议小结(1)
之前在做一个Ripple区块链的有关项目开发时遇到好多坑,将ripple协议分享出来,希望对大家也有帮助。
一、ripple源码下载地址
https://github.com/ripple/rippled
二、编译
下载好代码后,就要搭建编译环境。
1、二进制环境搭建
https://developers.ripple.com/install-rippled.html
1)Installation on CentOS/Red Hat with yum
This section assumes that you are using CentOS 7 or Red Hat Enterprise Linux 7.
Install the Ripple RPM repository:
$ sudo rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm
Install the rippled software package:
$ sudo yum install --enablerepo=ripple-stable rippled
Configure the rippled service to start on system boot:
$ sudo systemctl enable rippled.service
Start the rippled service
$ sudo systemctl start rippled.service
2) Installation on Ubuntu with alien
This section assumes that you are using Ubuntu 15.04 or later.
Install yum-utils and alien:
$ sudo apt-get update
$ sudo apt-get install yum-utils alien
Install the Ripple RPM repository:
$ sudo rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm
Download the rippled software package:
$ yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled
Verify the signature on the rippled software package:
$ sudo rpm --import https://mirrors.ripple.com/rpm/RPM-GPG-KEY-ripple-release && rpm -K rippled*.rpm
Install the rippled software package:
$ sudo alien -i --scripts rippled*.rpm && rm rippled*.rpm
Configure the rippled service to start on system boot:
$ sudo systemctl enable rippled.service
Start the rippled service
$ sudo systemctl start rippled.service
2、源码编译
1)基本依赖工具
$ sudo apt-get update
$ sudo apt-get install -y gcc g++ wget git make cmake protobuf-compiler libprotobuf-dev libssl-dev
2)下载编译boost源码
$ wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
$ tar -xzf boost_1_67_0.tar.gz
$ cd boost_1_67_0
$ ./bootstrap.sh
$ ./b2 headers
$ ./b2 -j8
$ ./b2 install
3)编译rippled
$ cd
$ git clone https://github.com/ripple/rippled.git
$ cd rippled
$ git checkout master
$ mkdir build
$ cd build
$ cmake -Dtarget=gcc.debug.unity ..
$ cmake --build . -- -j8