Project

General

Profile

Support #892

Install btcpool on FreeBSD

Added by Daniel Curtis over 7 years ago. Updated over 7 years ago.

Status:
Suspended
Priority:
Normal
Assignee:
Category:
Cryptocurrency
Target version:
Start date:
04/18/2017
Due date:
% Done:

0%

Estimated time:
2.00 h

Description

This is a guide for setting up btcpool on FreeBSD 10.

WARNING: This fails to build on FreeBSD 10 at the moment 4/25/17

Prepare the Environment

  • Make sure the system is up to date:
    pkg update && pkg upgrade
    portsnap fetch extract
    
  • Create a btcpool user:
    pw add user -n btcpool -s /sbin/nologin -c "BTC Pool" 
    
  • Install a few dependencies:
    pkg install gcc git gmake portmaster autotools libtool autoconf automake cmake openssl boost-libs gmp libconfig libzmq4 glog librdkafka libevent
    
  • Install Zookeeper and ensure its running, refer to issue #890
    service zookeeper start
    
  • Install Kafka and ensure its running, refer to issue #891
    service kafka start
    
  • Add the following to the make.conf file to enable ZMQ while compiling from ports:
    echo 'OPTIONS_UNSET+= DOCS NLS X11 EXAMPLES' >> /etc/make.conf
    echo 'OPTIONS_SET+= ZMQ' >> /etc/make.conf
    
  • Compile bitcoin-daemon from ports:
    portmaster net-p2p/bitcoin
    
  • Compile bitcoin-daemon from ports:
    portmaster net-p2p/bitcoin-daemon
    

Install MySQL Server

  • Start by installing the mariadb100-server and mariadb100-client packages:
    pkg install mariadb100-{server,client}
    
  • Copy a base MySQL configuration to use:
    cp /usr/local/share/mysql/my-small.cnf /var/db/mysql/my.cnf
    
  • Enable and start mysql at boot:
    echo 'mysql_enable="YES"' >> /etc/rc.conf
    service mysql-server start
    
  • Prepare the database for use by running the secure installation:
    NOTE: Choose a strong root password and answer yes to all questions.
    mysql_secure_installation
    

Create Databases and Users

  • Login to MySQL and create appropriate databases and users.
    mysql -u root -p
    
    • And run the following SQL queries to create the btcpooldb database and btcpooluser user:
      CREATE DATABASE btcpooldb CHARACTER SET utf8;
      
      CREATE USER 'btcpooluser'@'localhost' IDENTIFIED BY 'SuperSecretPassword';
      
      GRANT ALL PRIVILEGES ON btcpooldb.* TO 'btcpooluser'@'localhost';
      
      FLUSH PRIVILEGES;
      
      quit
      

Install btcpool

  • Download the latest version of btcpool from GitHub:
    git clone https://github.com/btccom/btcpool.git /usr/local/btcpool
    
  • Build btcpool using gcc:
    cd /usr/local/btcpool
    mkdir build && cd build
    env CC=gcc48 CXX=g++48 CPP=cpp48 cmake -DCMAKE_C_COMPILER=gcc48 -DCMAKE_CXX_COMPILER=g++48 -DCMAKE_BUILD_TYPE=Release ..
    env CC=gcc48 CXX=g++48 CPP=cpp48 gmake
    

Initialize btcpool

Create Kafka Topics

Init MySQL database tables

User list API

Init script

Resources

#1

Updated by Daniel Curtis over 7 years ago

  • Description updated (diff)
#2

Updated by Daniel Curtis over 7 years ago

  • Description updated (diff)
#3

Updated by Daniel Curtis over 7 years ago

  • Description updated (diff)
  • Status changed from New to Suspended

Also available in: Atom PDF