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
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!

2 thoughts on “How to Mine Ethereum on centOS 7

  1. Stanley Post author

    This will have happened because you already had an instance of Geth running.

    This sort of error can happen when you try to start a second instance of Geth, and it can’t grab the resources it needs because the first instance has them. When you killed Geth, you were killing the original instance.
    Find the PID of geth process, then kill it.

    $ ps aux | grep ‘geth’
    root 712 0.0 3.0 573574112 505984 S 23 616 283:07.70 /Applications/ –fast –cache 512

    $ kill -9 712

    Try the following links for alternate solutions:

  2. damiano

    Hi, great post, but I receive a message when run “geth -mine -minerthreads=2”
    Fatal: Error starting protocol stack: resource temporarily unavailable.
    what mean?

Leave a Reply

Your email address will not be published.