노출되는 이미지가 불편하시겠지만 양해를 구합니다. 노출, 클릭등에 관한 자료로 활용 중입니다.
viaBTC server 구축 / 거래소 만들기
requirements(필수 요소)
- zookeeper
- kafka
- librdkafka
- libev
- libmpdec
- jansson
- libmysqlclient-dev (apt-get install libmysqlclient-dev)
- http_parser
- libcurl
- + hiredis
- zookeeper : https://medium.com/@ryannel/installing-zookeeper-on-ubuntu-9f1f70f22e25
Zookeeper is a centralized service for maintaining configuration and state
for highly available distributed systems. - These steps should be taken on all nodes
Initial Setup - Install Java
- sudo apt-get install default -jre
- Create New User
- sudo adduser hadoop > qwer1234
- Create Data Directory
- sudo mkdir -p /data/zookeeper
- sudo chown -R hadoop:hadoop /data
- Download Zookeeper
- cd /opt
- sudo wget http://apache.is.co.za/zookeeper/zookeeper-3.4.10/zookeeper-3.4.10.tar.gz
- sudo tar -xvf zookeeper-3.4.10.tar.gz
- sudo chown hadoop:hadoop -R zookeeper-3.4.10
- Configure Zookeeper
- su hadoop
- Populate zoo.cfg
bash -c "cat > /opt/zookeeper-3.4.9/conf/zoo.cfg <<EOL
tickTime=2000
dataDir=/data/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
server.1=master:2888:3888
server.2=slave1:2888:3888
server.3=slave2:2888:3888
EOL" - Set the node ids
- Each node will need to be assigned a unique id
- bash -c “echo ‘1’ >> /data/zookeeper/myid”
- Debug Zookeeper
- bash /opt/zookeeper-3.4.9/bin/zkServer.sh start-foreground
- Start Zookeeper
- bash /opt/zookeeper-3.4.9/bin/zkServer.sh start
- 추가 설명 : https://www.joinc.co.kr/w/man/12/zookeeper/tutorial
- kafka : https://kafka.apache.org/
- kafka is used for building real-time data pipeline and streaming apps.
- It is horizontally scalable, fault-tolerant, wicked fast, and runs in production in thousands of companies
- quickstart : https://kafka.apache.org/quickstart
- download tgz : wget -c http://www-eu.apache.org/dist/kafka/1.0.0/kafka_2.11-1.0.0.tgz
- tar xvf kafka_2.11-1.0.0.tgz
- cd kafka_2.11-1.0.0
- first start a ZooKeeper : b in/zookeeper-server-start.sh config/zookeper.properties
- bin/kafka-server-start.sh config/server.properties
- Cannot allocate memory(errno=12)
- kafka-server-start.sh
- export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
- export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"
- http://blog.csdn.net/womenrendeme/article/details/76855490
- librdkafka
- Requirements
- The GNU toolchain
- sudo apt-get install build-essential (will install compilers)
- GNU make
- pthreads
- zlib ( optional, for gzip compression support)
- apt-cache search zlib
- apt-cache search ^zlib
- apt-get update :to become root to refresh the package lists, then
apt-get install <whatever_package_want>
apt-get install glibc - sudo apt-get install git
- libssl-dev ( optional, for SSL and SASL SCRAM support )
- sudo apt-cache search libssl
- sudo apt-get install libssl-dev
- libsasl2-dev ( optionla, for SASL GSSAPI support)
- sudo apt-cache search libsasl2
- sudo apt-get install libsasal2-dev
- Building
- git clone https://github.com/edenhill/librdkafka.git
- sudo ./configure
- sudo make
- sudo make install
- /usr/local/lib
- librdkafka.so.1
- libev
- A full-featured and high-performance event loop that is loosely modelled after libevent,
but without its limitations and bugs. - sudo apt-get install libev-dev
- libmpdec
- is a package for correctly-rounded arbitrary precision decimal floating arithmetic.
- wget -c http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.4.2.tar.gz
- tar xvfz mpdecimal-2.4.2.tar.gz
- cd mpdecimal-2.4.2
- ./configure
- make
- sudo make install
- jansson
- Jansson is a C library for encoding, decoding and manipulating JSON data.
- git clone https://github.com/akheron/jansson
- sudo apt-get install autoconf, automake, libtool
- http://jansson.readthedocs.io/en/latest/gettingstarted.html#compiling-and-installing-jansson
- autoreconf -i
- ./configure
- make
- make install
- libmysqlclient-dev (apt-get install libmysqlclient-dev)
- http_parser
- is a parser for HTTP messages writtern in C.
- git clone https://github.com/nodejs/http-parser.git
- make
- sudo make install
- libcurl
- is a free and easy-to-use client-side URL transfer library, supporting ...
- https://curl.haxx.se/libcurl/
- wget -c https://curl.haxx.se/download/curl-7.57.0.tar.gz
- tar xvgz curl-7.57.0.tar.gz
- cd curl-7.57.0
- configure
- make
- sudo make install
- hiredis
- is a minimalistic C client library for the Redis database
- https://github.com/redis/hiredis
- git clone https://github.com/redis/hiredis.git
- make
- sudo make install
'IT Tech. > CrytoCurrency' 카테고리의 다른 글
BitCoin 0.15 vs LiteCoin 0.15 ( 소스 코드 비교 ) (0) | 2018.01.12 |
---|---|
코인별 마켓 규모 (12) | 2017.12.14 |
모네로 채굴용 Pool 구축하기 (2) | 2017.09.06 |
xmr-stak-cpu 빌드(컴파일) 하기 (0) | 2017.09.06 |
CudaMiner 윈도우용 컴파일 하기 (0) | 2017.08.24 |