尝试编译BitShares Core

in #bitshares6 years ago

都说纸上得来终觉浅,绝知此事要躬行,尽管看过好多大神的编译指南之类的,但是还有感觉有些迷糊,没办法,不亲自操作一下,理解的难免不深刻。怎么形容呢,就好比学数学不做习题,学编程不上机。所以今天就上机操作一下。

系统要求

@abit《BTS交易所对接指南(单节点版)》中提到,系统的最小要求为:

独立服务器或者VPS
8G 内存(更多更好)
50G 硬盘

所以我去Linode选了如下VPS

看起来应该符合要求

官方推荐的系统为:Ubuntu 16.04 LTS,听人劝吃饱饭,那就用Ubuntu 16.04 LTS好了。
内核版本为4.14.14,据说打完Meltdown补丁了😳

准备工作

更新系统软件包

首先更新了一下系统上的软件包
sudo apt-get update
sudo apt-get upgrade

安装依赖

安装必要的依赖
sudo apt-get install autoconf cmake git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev

编译

检出代码并编译

git clone https://github.com/bitshares/bitshares-core.git
cd bitshares-core
git checkout <LATEST_RELEASE_TAG>
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make witness_node cli_wallet

上述指令中,需要将<LATEST_RELEASE_TAG>替换成最新发布版本号,撰写本文时,为2.0.171212

编译结果

经过漫长的等待(约1一个半小时),编译总算完成了。这个时间应该取决于硬件配置。

编译完成后我们得到两个程序

  • build/programs/witness_node/witness_node
  • build/programs/cli_wallet/cli_wallet

为了方便,我把它俩复制到~/programs 目录下。

时间校准

因为广播交易什么的都和时间有关,所以必须保证时间正确,否则一切免谈。

大神推荐如下方法:
sudo timedatectl set-ntp false
sudo apt-get install ntp

我看了一下,系统上已经启动了一个systemd-timesyncd进程,由timedatectl指令控制,也是用于时间同步的,大神的做法是关掉这个,启用ntp。

我测试一下,貌似这个东东应该可以用,那就先用着好了,出问题的时候再换其它方法。

来试试看:timedatectl

其它

本来想再做做其它尝试,结果我到VPS的连接掉线了。为什么会掉线呢,当然是Party 妈妈怕我们受到资本主义那么腐朽的东西的毒害。其实我真的就是ssh登陆,没用来做ssh隧道,冤枉死我了。

不过既然Party 妈妈让我休息休息,那就先写到这里好了,晚上再说吧。

参考链接

Sort:  

O哥在技术的路上越走越远啊。

推荐使用这个https://contabo.com VPS,性价比超高。。

感谢推荐,下次试试

Thanks a lot for sharing extra goodness for our almighty Bitshares!

All for one and one for all! Namaste :)

Where You are... I'm there...
What are you doing.... I'm just showing..
when make you theme... I want to resteem...
&
You Post here photo...my Upvote auto..
Who are you man... I'm your Big fan...
"" Great to Share"'

Abdul, you okk?? lol

Your post is awesome thanks for sharing this post. Please upvote my post too.

Nice work. Honestly I really appreciate it

You always upload importance post thanks for sharing

Your post is awesome thanks for sharing this post. Please upvote my post too,,, You always upload importance post thanks for sharing,,,
look at this project please
https://steemit.com/cryptocurrency/@frederichs/10-best-cryptocurrency-to-invest-in-short-medium-and-long-term-we-will-talk-one-by-one-in-different-post-for-further-explanation

O哥
我现在做了个wordpress的站点
但是想知道怎么使用 steemconnect的api 实现steemit账号 可以登陆我的wordpress站点嘛?

WordPress和steemconnect我都不太了解 😳

好高深

Coin Marketplace

STEEM 0.31
TRX 0.11
JST 0.034
BTC 66765.98
ETH 3234.00
USDT 1.00
SBD 4.23