viabtc_exchange_server编译

第一个方案

install rpm
rpm -ivh --force --nodeps --replacepkgs mysql57-community-release-el7-11.noarch.rpm
rpm -ivh --force --nodeps --replacepkgs rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

install libdevel
yum -y install rpmforge-release libgcc glibc-common glibc-static glibc libstdc++ mpfr xmlrpc-c xmlrpc-c-client cpp libstdc++-devel openssl openssh bind-libs libgomp kernel-headers glibc-headers glibc-devel gcc gcc-c++ bind-utils openssh-clients openssh-server make cmake libpcap curl cyrus-sasl cyrus-sasl-devel zlib-static cyrus-sasl-lib openssl-devel openssl-static lz4-static lz4-devel mysql-community-client mysql-community-devel mysql-community-libs psmisc tree

check libmysqlclient.so
if [ ! -f /usr/lib64/libmysqlclient.so ] ; then
ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib64/libmysqlclient.so
fi

install curl
install http-parser
install jansson
install mpdecimal
installlibev
install librdkafka
make viabtc_exchange_server
cd viabtc_exchange_server/depends/hiredis/
make
cd viabtc_exchange_server/network/
make
cd viabtc_exchange_server/utils/
make
cd viabtc_exchange_server/accesshttp/
make
cd viabtc_exchange_server/accessws/
make
cd viabtc_exchange_server/alertcenter/
make
cd viabtc_exchange_server/marketprice/
make
cd viabtc_exchange_server/matchengine/
make
cd viabtc_exchange_server/readhistory/
make






Install Must Service
install mysql
install redis + redis-sentinel (Cannot set auth pass)
install java
install zookeeper
install kafka
install nginx (proxy WebSocket)

第二个方案

引用

viabtc_exchange_server,是交易所源代码。我们现在就编译一下这款产品。

$ sudo apt install -y libev-dev libjansson-dev libmpdec-dev libmysqlclient-dev libcurl4-gnutls-dev libldap2-dev libgss-dev librtmp-dev libsasl2-dev
  • 1
# librdkafka: 0.11.3+; DO NOT INSTALL BY APT: version too old (0.8.x);
# if you do, remove them by: sudo apt remove librdkafka1 librdkafka-dev 
  • 1
  • 2
$ wget https://github.com/edenhill/librdkafka/archive/v0.11.3.tar.gz -O librdkafka-0.11.3.tar.gz
$ tar zxf librdkafka-0.11.3.tar.gz
$ cd librdkafka-0.11.3
$ ./configure
$ make
$ sudo make install
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

COMPILATION

引用

$ git clone https://github.com/viabtc/viabtc_exchange_server.git
$ cd viabtc_exchange_server

$ make -C depends/hiredis
$ make -C network

$ vi utils/makefile #modify INCS
# INCS = -I ../network -I ../depends
$ make -C utils

$ vi accesshttp/makefile #modify INCS & LIBS
# INCS = -I ../network -I ../utils -I ../depends
# LIBS = -L ../utils -lutils -L ../network -lnetwork -L ../depends/hiredis -Wl,-Bstatic -lev -ljansson -lmpdec -lrdkafka -lz -lssl -lcrypto -lhiredis -lcurl -Wl,-Bdynamic -lm -lpthread -ldl -lssl -lldap -llber -lgss -lgnutls -lidn -lnettle -lrtmp -lsasl2 -lmysqlclient
$ make -C accesshttp

$ vi accessws/makefile
{modify INCS and LIBS like accesshttp/makefile}
$ make -C accessws

vi alertcenter/makefile
{modify INCS and LIBS like accesshttp/makefile}
$ make -C alertcenter

$ vi marketprice/makefile
{modify INCS and LIBS like accesshttp/makefile}
$ make -C marketprice

$ vi matchengine/makefile
{modify INCS and LIBS like accesshttp/makefile}
$ make -C matchengine

$ vi readhistory/makefile
{modify INCS and LIBS like accesshttp/makefile}
$ make -C readhistory

猜你喜欢

转载自blog.csdn.net/akai9898/article/details/81503241