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
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
打赏
微信扫一扫,打赏作者吧~