Mining STEEM on Fedora with Systemd SERVICE

in mining •  8 years ago  (edited)

Hi all,

This is my procedure for mining STEEM on a Fedora  23 machine.

MINING section: 

Some dependencies: 

sudo dnf install boost-devel python-devel autoconf openssl-devel automake cmake git  libdb-devel libtool nano

So, in the first time we setup our gmplib for a better mining performance (thanks to @abit)

sudo dnf remove gmp-devel
wget -c http://mpir.org/mpir-2.7.2.tar.bz2 tar xjf mpir-2.7.2.tar.bz2
cd mpir
./configure --enable-gmpcompat
make
sudo make install
cd

Good, now let's configure libboost (thanks to @joseph )

wget -O boost_1_60_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz/download
tar xzvf boost_1_60_0.tar.gz
cd boost_1_60_0
./bootstrap.sh --prefix=/usr/local
./b2 install
cd

if you got some error, please reply under this post, probably you miss some dependencies..

So, now we donwload the STEEM from github

git clone https://github.com/steemit/steem
cd steem
git submodule update --init --recursive
cmake .
make

After the compilation is done, create the witness folder and modify the config.ini file:

cd steem/programs/steemd
./steemd
press ctrl+c on your keyboard
cd witness_node_data_dir
nano  config.ini

scroll down to the line under #seed-node and enter these lines:


seed-node = seed.cubeconnex.com:2001
seed-node = 178.62.246.203:2001
seed-node = seed.steemed.net:2001
seed-node = steem.clawmap.com:2001
seed-node = seed.steemwitness.com:2001
seed-node = steem-seed1.abit-more.com:2001
seed-node = 185.82.203.92:2001
seed-node = 52.38.66.234:2001
seed-node = 52.37.169.52:2001
seed-node = 52.26.78.244:2001
seed-node = 192.99.4.226:2001
seed-node = 46.252.27.1:1337
seed-node = 81.89.101.133:2001
seed-node = 52.4.250.181:39705
seed-node = 85.214.65.220:2001

then scroll down under #witness and enter at least 3 distinct witnesses like this


witness = "witness"
witness = "witness1"
witness = "witness2"
witness = "witness3"
witness = "witness4"

now you need to generate the privkey for your miners, you can do with bitaddress.org

Generate at least 5 privkey.

(follow this link for the guide :  guide )

Then go down to after #miner and enter like this


miner = ["witness", "privatekey"]
miner = ["witness1", "privatekey1"]
miner = ["witness2", "privatekey2"]
miner = ["witness3", "privatekey3"]
miner = ["witness4", "privatekey4"]

Then under #mining-threads enter


mining-threads = 8
(less or equal at your number of core, virtual + fisical)

Press now Ctrl + X and select Y

Now in theory, we could begin to download the chain, but STEEM is still unstable, and sometimes crashes

So, we will create a system service with systemd with autorestart :)

cd /lib/systemd/system
nano steem.service

In the editor put the following lines:

[Service]
Restart=always
RestartSec=10
WorkingDirectory=/home/YOURUSER/steem/programs/steemd
ExecStart=/home/YOURUSER/steem/programs/steemd/steemd --rpc-endpoint 2>debug.log 1>error.log
User=YOURUSER

Update systemd

systemctl daemon-reload
service steem start

So now, if you lunch a

ps aux | grep steem 

you probably see the steem process active, if not, sometimes is wrong ( ahah )

CLI WALLET section:

In the end, you can follow the chain progress with cli-wallet or with debug.log

With the cli wallet, follow the progress with info command and import your private keys:

cd steem/programs/cli_wallet
./cli_wallet
set_password YOURPASSWORD
unlock YOURPASSWORD
info
import_key PRIVKEY
import_key PRIVKEY1
....

So you need to wait the blockchain synchronization to start mining, after that, when you found your first block, your witness will be registered here https://steemd.com/@YOURWITNESS

For problems or advice, please reply under this post

References:


Best

UAU








Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!