区块链中文技术社区 - 矿池-新手教程
type: channel
link: https://bcskill.com/index.php/category/矿池-新手教程/
items: btcpool 编译安装，以及ETH私池搭建

btcpool 编译安装，以及ETH私池搭建
type: item
date: 2021-01-25T16:30:00+08:00
description: 部署条件 部署系统： ubuntu 18.04 矿池交互图 编译源代码 git clone https://github.com/btccom/btcpool.git 安装依赖 sudo apt-get update sudo apt-get install -y git build-essential autotools-dev libtool autoconf automake pkg-config cmake \ openssl libssl-dev libcurl4-openssl-dev libconfig++-dev \ libboost-all-dev libgmp-dev libmysqlclient-dev libzookeeper-mt-dev \ libzmq3-dev libgoogle-glog-dev libhiredis-dev zlib1g zlib1g-dev \ libsodium-dev libprotobuf-dev protobuf-compiler 注意：不再建议libevent-dev从软件源安装。 libevent的发行版和稳定版本将在sserver中导致死锁错误（问题＃75）。建议您使用下面的命令从它的master分支手动构建libevent。 有时一个或两个软件包由于依赖关系问题而失败，您可以尝试aptitude sudo apt-get update sudo apt-get install -y aptitude sudo aptitude install git build-essential autotools-dev libtool autoconf automake pkg-config cmake \ openssl libssl-dev libcurl4-openssl-dev libconfig++-dev \ libboost-all-dev libgmp-dev libmysqlclient-dev libzookeeper-mt-dev \ libzmq3-dev libgoogle-glog-dev libhiredis-dev zlib1g zlib1g-dev \ libsodium-dev libprotobuf-dev protobuf-compiler # Input `n` if the solution is `NOT INSTALL` some package. # Eventually aptitude will give a solution that downgrade some packages to allow all packages to be installed. 安装ZooKeeper 安装依赖 sudo apt-get install -y zookeeper zookeeper-bin zookeeperd 创建所需目录 mkdir -p /data/work/zookeeper mkdir /data/work/zookeeper/version-2 touch /data/work/zookeeper/myid sudo chown -R zookeeper:zookeeper /data/work/zookeeper 设置机器id sudo echo 1 > /data/work/zookeeper/myid 修改配置 sudo vim /etc/zookeeper/conf/zoo.cfg initLimit=5 syncLimit=2 clientPort=2181 clientPortAddress=127.0.0.1 dataDir=/data/work/zookeeper #伪分布式 server.1=127.0.0.1:2888:3888 启动服务 #start/stop service sudo service zookeeper restart #service zookeeper start/stop/restart/status 安装Kafka 安装依赖 sudo apt-get install -y default-jre 安装java 1.8 sudo apt-get update sudo apt-get install openjdk-8-jdk update-alternatives --display java sudo update-alternatives --config java java -version 安装kafka mkdir -p /data/work/kafka cd /data/work/kafka wget https://archive.apache…