masternode linux 教程~~ 脚本 节点分配50%的挖矿产生的币~~ 为了区块链健康 所以节点需要币很少

cpuminer-gts windows版本将于5月8号发布至github 以及gentecoin.com 网站

masternode 节点需要1000个币

ubuntu 16.04 编译流程
posted 05/03/2018 23:45:17

ubuntu 16.04 编译流程
1:sudo apt-get update && sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils && sudo apt-get install python-software-properties && sudo apt-get install software-properties-common && sudo add-apt-repository ppa:bitcoin/bitcoin
2:sudo apt-get update && sudo apt-get install libminiupnpc-dev libdb4.8-dev libdb4.8++-dev && sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
3:下载钱包源码 进入钱包源码目录
4:./autogen.sh && ./configure --disable-gui-tests  --disable-tests && make && make install

masternode linux 脚本 将下面内容保存为gts.sh文件在linux 系统上赋予执行权限 即 chmod -R 755 ./gts.sh
posted 05/03/2018 23:03:09

#! /bin/bash
echo "确保已经编译安装gts 并已经执行make install !"
genteshared --daemon & # append to background 
echo "We're now going to wait 30 seconds to allow genteshared time to sync"
echo "如果是阿里云等其他主机 请将本文件中 $(ifconfig | head -n 2 | sed '1d' | awk '{print $2}' | awk -F ':' '{print $2}') 这一段换成自己的外网ip即可"
sleep 30
echo "addnode"
genteshare-cli addnode 172.96.251.231 add
genteshare-cli addnode 47.98.131.239 add
genteshare-cli addnode 118.26.118.43 add
genteshare-cli addnode 23.83.228.154 add
genteshare-cli addnode 47.52.210.40 add
echo "sleep 120s to connect seed and sync!"
sleep 120
genteshare-cli getinfo
echo "We are now goign to generate a wallet addrress to deposit GTS into"
accountaddr0=$(genteshare-cli getaccountaddress MN1)
echo "$accountaddr0" >> ~/accountaddr0
echo "$accountaddr0"
echo "Please send exactly 1000 GTS to this address in one transaction from cryptopia making sure to account for the fee"
echo "This may mean you might have to send 1000.001GTS"
echo "Sleeping for 120 seconds"
sleep 120
echo "Generate masternode key and saving it to a file"
genteshare-cli masternode genkey >> ~/gentesharedmasternodekey
sleep 3
genteshare-cli masternode outputs >> ~/gentesharedmasternodetx
sleep 3
echo "Stopping genteshared"
genteshare-cli stop
echo "Sleeping for 60 seconds"
sleep 30
echo "rpcuser=root">>~/.gentesharecore/genteshare.conf
echo "rpcpassword=rootroot">>~/.gentesharecore/genteshare.conf
echo "rpcallowip=127.0.0.1">>~/.gentesharecore/genteshare.conf
echo "gen=0">>~/.gentesharecore/genteshare.conf
echo "listen=1">>~/.gentesharecore/genteshare.conf
echo "server=1">>~/.gentesharecore/genteshare.conf
echo "daemon=1">>~/.gentesharecore/genteshare.conf
echo "logtimestamps=1">>~/.gentesharecore/genteshare.conf
echo "txindex=1">>~/.gentesharecore/genteshare.conf
echo "maxconnections=128">>~/.gentesharecore/genteshare.conf
echo "rpcthreads=16">>~/.gentesharecore/genteshare.conf
echo "masternode=1">>~/.gentesharecore/genteshare.conf
echo "bind=$(ifconfig | head -n 2 | sed '1d' | awk '{print $2}' | awk -F ':' '{print $2}'):9999">>~/.gentesharecore/genteshare.conf
echo "masternodeprivkey=$(cat ~/gentesharedmasternodekey)" >> ~/.gentesharecore/genteshare.conf

masternodetx="$(cat ~/gentesharedmasternodetx)"
masternodetxkey=${masternodetx#  '"'}
masternodetxkey=${masternodetxkey%'"':}
masternodetxvalue=${masternodetx#*'"': '"'}
masternodetxvalue=${masternodetxvalue%'"'*}
#如果是阿里云等其他主机 请将$(ifconfig | head -n 2 | sed '1d' | awk '{print $2}' | awk -F ':' '{print $2}') 这一段换成自己的外网即可
#
echo "MN1 $(ifconfig | head -n 2 | sed '1d' | awk '{print $2}' | awk -F ':' '{print $2}'):9999 $(cat ~/gentesharedmasternodekey) ${masternodetxkey} ${masternodetxvalue}" >> ~/.gentesharecore/masternode.conf

sleep 10

# echo "masternodeprivkey=$(cat ~/gentesharedmasternode_key)" >> ~/.gentesharecore/masternode.conf

genteshared --daemon
echo "Waiting for 15 transactions. Sleeping for 2250 seconds"
sleep 2250
genteshare-cli masternode start