C++ Match Engine撮合引擎 安装搭建(ubuntu)

时间:2020-10-22作者:klpeng分类:系统架构浏览:1208评论:0

1.迁出代码:https://github.com/klpeng/viabtc_exchange_server.git


2.安装mysql :apt -y install mysql-server


3.安装redis : apt -y install redis


4.安装java1.8:apt -y install openjdk-8-jdk


cd zookeepr/conf
mv zoo_simple.cfg zoo.cfg
启动:bin/zkServer.sh start

连接:bin/zkCli.sh


cd kafka
vim config/server.properties
修改配置文件中21、31、36和60行
broker.id=1
listeners=PLAINTEXT://:9092
advertised.listeners=PLAINTEXT://host_ip:9092
log.dirs=/home/wzj/kafka/logs-1
启动: bin/kafka-server-start.sh config/server.properties
或者: nohup bin/kafka-server-start.sh config/server.properties &


重点:安装redis集群一主二从三哨兵


7. 安装依赖库:

sudo apt install -y libev-dev libjansson-dev libmpdec-dev libmysqlclient-dev libcurl4-gnutls-dev  libldap2-dev libgss-dev librtmp-dev libsasl2-dev libssl-dev
librdkafka :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
libev  :  apt install libev-dev -y
libmpdec :  apt install libmpdec-dev -y
jansson  :  wget http://www.digip.org/jansson/releases/jansson-2.12.tar.gz   .configure  &&  make && make install
libmysqlclient-dev :  apt install libmysqlclient-dev -y
http_parser : apt install libhttp-parser-dev -y
libcurl : apt install libcurl4-openssl-dev -y


8. apt -y install python-dev

$ 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


打赏
文章版权声明:除非注明,否则均为彭超的博客原创文章,转载或复制请以超链接形式并注明出处。
相关推荐

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

猜你喜欢