btcpool矿池-测试环境搭建及使用cgminer测试
注意:不管你做哪个币的池,都需要比特币源码,因为我们编译矿池的时候需要比特币源码里面的库
本项目未开源支付的代码,因此支付操作需要自己进行开发。
安装Bitcoind+ZMQ
apt-get -y install build-essential libtool autotools-dev automake autoconf pkg-config bsdmainutils python3apt-get -y install libdb-dev libdb++-dev libminiupnpc-dev libzmq3-dev libssl-dev libboost-all-dev libevent-devapt-get -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev#ToBuildwget https://github.com/bitcoin/bitcoin/archive/v0.16.3.tar.gztar -zxvf v0.16.3.tar.gz
若我们想要创建非比特币矿池,我们无需对比特币源码进行编译,因此以下命令可以不执行;若创建比特币矿池,需要编译比特币钱包或自行前往比特币官方github下载
cd bitcoin-0.16.3/./autogen.sh./configure --with-incompatible-bdb --prefix=/work/bitcoinmakemake install#start/stop servicecd /work/bitcoin/bin/./bitcoind --daemon-testnet -zmqpubhashtx=tcp://0.0.0.0:18331 -zmqpubhashblock=tcp://0.0.0.0:18331#./bitcoin-cli-testnet stop
安装ZooKeeper
apt-get install -y zookeeper zookeeper-bin zookeeperd#mkdir for datamkdir -p /work/zookeepermkdir /work/zookeeper/version-2touch /work/zookeeper/myidchown -R zookeeper:zookeeper /work/zookeeper#set machine idecho 1 >/work/zookeeper/myid#edit config filevim /etc/zookeeper/conf/zoo.cfginitLimit=5syncLimit=2clientPort=2181clientPortAddress=127.0.0.1dataDir=/work/zookeeper#伪分布式 server.1=127.0.0.1:2888:3888#start/stop serviceservice zookeeper restart#service zookeeper start/stop/restart/status
安装Kafka
#install dependsapt-get install -y default-jre#install Kafkamkdir /root/sourcecd /root/sourcewget https://archive.apache.org/dist/kafka/2.2.1/kafka_2.11-2.2.1.tgzmkdir -p /work/kafkacd /work/kafkatar -zxf /root/source/kafka_2.11-2.2.1.tgz --strip 1#edit confvim /work/kafka/config/server.properties broker.id=1offsets.topic.replication.factor=1message.max.bytes=20000000replica.fetch.max.bytes=30000000log.dirs=/work/kafka-logslisteners=PLAINTEXT://127.0.0.1:9092#伪分布式zookeeper.connect=127.0.0.1:2181#start servercd /work/kafkanohup /work/kafka/bin/kafka-server-start.sh /work/kafka/config/server.properties >/dev/null 2>&1 &
安装BTCPool
cd /work
安装需要的包
apt-get updateapt-get install -y 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#zmq-v4.1.5mkdir -p /root/source && cd /root/sourcewget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gztar zxvf zeromq-4.1.5.tar.gzcd zeromq-4.1.5./autogen.sh && ./configure && make -j$CPUS && make check && make install && ldconfig#glog-v0.3.4mkdir -p /root/source && cd /root/sourcewget https://github.com/google/glog/archive/v0.3.4
本站所有软件信息均由用户上传发布,版权归原著所有。如有侵权/违规内容,敬请来信告知邮箱:764327034@qq.com,我们将及时撤销! 转载请注明出处:https://czxurui.com/zx/11301.html
发表回复
评论列表(0条)