Tag Archives: mining

How to Mine Ethereum on centOS 7

Mining on centos7 seems to be a labor and existing guides are outdated or hard to find. Here is one updated and written for our times. Keep in mind, using this will consume 10s of GB of disk space, this is because the whole block chain, has to be downloaded.

Make sure you have git installed:
yum install git
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
make geth
The full command to start geth will look something like this
/go-ethereum/build/bin/geth account list

Use a symbolic link so you can use geth without the long filepath
ln -s /go-ethereum/build/bin/geth /usr/local/bin/geth

The command below should now work
geth account list

It will not return any result because you don’t have any accounts created or imported. If you don’t have a ethereum address, then you can create a new one by typing geth account new

If you do have an account already create a new file and paste the unencrypted private key like so as shown below:

Create a new file named “pass”
touch pass

Edit that file, you can use any editor, i use the editor nano
nano pass
paste the unencrypted key, Ctrl+X to save and exit it.

Now have geth import that file with its key
geth account import pass

Now make sure that account is imported:
geth account list

Protect the unencrypted pass file, don’t ever let anyone touch it or lose it
chmod 700 pass
Chmod prevents other users from using it or seeing it.

Then start mining:
geth –mine –minerthreads=2

Now I recommend installing screen and running it in a screen so you can use the terminal for other business or run geth in the background using the & flag.

For screen
yum install screen

Then mine and hold ctrl + A + D, this will detach the screen but keep it open

You can return to that screen session by typing
screen -r

That’s it!