Linux下安装比特币矿池p2pool笔记

Linux(ubuntu/centOS)下安装比特币矿池p2pool笔记

RHEL系列:

安装bitcoin钱包:

  • rpm方式:
    rpm -ivh http://linux.ringingliberty.com/bitcoin/el6/x86_64/bitcoin-release-1-6.noarch.rpm
    yum install bitcoin-server

  • 创建 bitcoin.conf:
    vi ~/.bitcoin/bitcoin.conf

rpcuser=RPC帐号
rpcpassword=RPC密码
server=1
rpcallowip=127.0.0.1
rpcport=8332
port=8333
  • 立刻运行bitcoind:
    RHEL 7: Run:systemctl start bitcoin
    RHEL 6: Runchkconfig bitcoin on
  • 查看bitcoind运行信息:bitcoin-cli getinfo
  • 设置bitcoind开机运行:
根据系统版本
RHEL 6: Run chkconfig bitcoin on
RHEL 7: Run: systemctl enable bitcoin
  • 查看运行状态:
  • tail -f ~/.bitcoin/debug.log

安装矿池程序p2pool:

  • 安装pyhton2.7环境(方法太多,随便写点):
    wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz -P /opt
    tar xvf Python-2.7.3.tgz
    ./configure
    make && make install

  • pip安装zope.interface:
    sudo pip install zope.interface

  • 安装Twisted:
    easy_install Twisted

  • 资源地址:
    zope.interface:http://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.0.1.tar.gz
    rpm安装zope.interface:http://rpmfind.net/linux/rpm2html/search.php?query=python-zope-interface
    twisted:http://twistedmatrix.com/Releases/Twisted/12.1/Twisted-12.1.0.tar.bz

  • 从git获取的p2pool:
    git clone https://github.com/forrestv/p2pool.git
    没git的yum install git

  • 启动矿池:
    cd p2pool
    python run_p2pool.py rpc帐号 rpc密码 -a 钱包地址 --bitcoind-address 127.0.0.1 --net bitcoin --fee 0 --give-author 0 --no-bugreport --outgoing-conns 6

ubuntu系统:

安装bitcoin钱包:

sudo wget https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-x86_64-linux-gnu.tar.gz
sudo tar -xzf bitcoin-0.15.1-x86_64-linux-gnu.tar.gz
sudo cp bitcoin-0.15.1/bin/* /usr/bin

  • 创建 bitcoin.conf:
    sudo vi ~/.bitcoin/bitcoin.conf

    rpcuser=RPC帐号
    rpcpassword=RPC密码
    server=1
    rpcallowip=127.0.0.1
    rpcport=8332
    port=8333
  • 后台运行bitcoin钱包:
    sudo bitcoind -daemon

  • 查看运行状态:
    sudo tail -f ~/.bitcoin/debug.log

安装矿池程序p2pool:

  • 安装pyhton2.7环境:
    sudo apt-get install python-zope.interface python-twisted python-twisted-web git python-dev
    sudo apt-get install libpython2.7-stdlib

  • 获取p2pool程序:
    sudo git clone https://github.com/forrestv/p2pool.git

  • 后台启动矿池:
    SSH连接的终端需要用到screen: sudo apt-get install screen
    cd p2pool
    screen -dmS myp2pool python run_p2pool.py rpc用户名 rpc密码 -a 钱包地址 --bitcoind-address 127.0.0.1 --net bitcoin --fee 0 --give-author 0 --no-bugreport --outgoing-conns 6

  • 查看矿池:
    screen -r myp2pool

注:钱包不更新区块链数据包的,自己运行

bitcoind server

你可能感兴趣的:(电子货币,比特币自建矿池,p2pool矿池搭建,linux搭建矿池)