Masternode tasks
This is fast simple enumeration of regular task with cryptocurrency. Any cryptomoney is similar, therefore I use one of them - genesisx.
- Prepare Ubuntu 16 for installing cryptomoney
# sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev # sudo apt-get install libminiupnpc-dev # # sudo add-apt-repository ppa:bitcoin/bitcoin # sudo apt-get update # sudo apt-get install libdb4.8-dev libdb4.8dev # sudo apt-get install libminiupnpc-dev # # sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
# mkdir genesisx +ACY& cd genesisx # git clone https://github.com/genesis-x/genesis-x.git # cd genesis-x # # sudo -i # cd /home/coinadmin/genesisx/genesis-x # root+AEA-ubuntu-bit:/home/coinadmin/genesisx/genesis-x# chmod 777 -R +ACo- # su coinadmin
# ./autogen.sh # ./configure # make # sudo make install
Finish must look as:
libtool: install: /usr/bin/install -c genesisxd /usr/local/bin/genesisxd libtool: install: /usr/bin/install -c genesisx-cli /usr/local/bin/genesisx-cli libtool: install: /usr/bin/install -c genesisx-tx /usr/local/bin/genesisx-tx libtool: install: /usr/bin/install -c test/test+AF8-genesisx /usr/local/bin/test+AF8-genesisx
This means you have masternode engine in your computer.
# cat .genesisx/genesisx.conf rpcuser=-3mes5o7mww289lc7r6zkqekmsdfkjmnnv8xj3rwvdinbhfuuwqj664qs3u1lb7kh5 rpcpassword=-qdhjlnq4h3q66wg9pv7o99ipxzasdaskfdhsdfgxo2c4opy3o7yrco38ckj2 rpcport=-555XX rpcconnect=-127.0.0.1 rpcallowip=-127.0.0.1 server=-1 daemon=-1 listen=-1 discover=-1 staking=-0 logtimestamps=-1 maxconnections=-50 txindex=-1 zapwallettxes=-0 externalip=ZZZ.ZZZ.ZZZ.ZZZ port=YYYY addnode=-192.168.0.221:5555 addnode=-95.216.59.97:5555 addnode=-173.249.17.41:5555 addnode=-5.189.182.209:5555 addnode=-80.254.127.139:5555 addnode=-62.122.242.31:5555 addnode=-62.171.152.94:5555
# genesisxd -daemon # watch genesisx-cli getinfo
If you see something like in screen below, you have win, but usually to rich this step need a lot of efforts.
Take a time while database syncing. Usually this need a hours. Check daemon activity by.
# top # watch iostat -x (need install firtly as sudo apt install sysstat) # iptraf-ng (need install firstly as sudo apt-get install iptraf-ng)
# genesisx-cli stop
Than need to create needed quantity of new user.
# sudo useradd -s /bin/bash -d /home/coin1/ -m -G sudo coin1 # sudo passwd coin1
And than copy database to each user
# sudo cp -R /home/coinadmin/.genesisx /home/coin1/.genesisx # sudo chown -R coin1:coin1 /home/coin1/
Than need to change each config - port and rpcport - in each config.
#nano .genesisx/genesisx.conf
Than start daemon for each use account.
# genesisxd -daemon # watch genesisx-cli getinfo
+ACMAIQ-/bin/bash genesisx-cli stop sed -i '/+AF4-port/ a masternode=-1' .genesisx/genesisx.conf sed -i "/+AF4-port/ a masternodeprivkey=AJA-1" .genesisx/genesisx.conf echo -n " +ACQ-1 " grep '+AF4-port' .genesisx/genesisx.conf genesisxd -daemon
Usually I also copy this script to /usr/local/bin, but no matter. Create it, mark as executable and perform it.
# nano addkey
# chmod addkey
# ./addkey ZZZZZZZZZZ
# sudo apt-get update # sudo apt-get -y install python-virtualenv # git clone https://github.com/gobytecoin/sentinel.git +ACY& cd sentinel # virtualenv ./venv # ./venv/bin/pip install -r requirements.txt # crontab -e # +ACo- +ACo- +ACo- +ACo- +ACo- cd /home/YOURUSERNAME/sentinel +ACY& ./venv/bin/python bin/sentinel.py >/dev/null 2>&1 # nano sentinel.conf # gobyte+AF8-conf=-/home/YOUR HOME DIRECTORY/.gobytecore/gobyte.conf
Comments (
)
Link to this page:
//www.vb-net.com/MasternodeTask/Index.htm
|