Installing cgminer on Ubuntu

Since I know BitCoin I was being more and more curious about it. Today during some spare time I had I decided to start mining my own coins.

The program I chose was cgminer between those options for people who has no GPU.

Cgminer can work with CPU, with GPU or with both at the same time.

Instaling requirements

apt-get install git autoconf libtool libcurl4-openssl-dev libncurses5-dev pkg-config yasm make

These are the program needed to compiler the tool and make it run.

Installing cgminer itself

First, become root. Then clone the GitHub repo, prepare the compilation and finally compile it:

$ sudo su
# cd /opt/
# git clone git://github.com/ckolivas/cgminer.git
# cd cgminer/
# ./autogen.sh --disable-opencl --disable-adl --enable-cpumining
# CFLAGS="-O2 -Wall -march=native" ./configure --disable-opencl --disable-adl --enable-cpumining 
# make -j8

If you have an GPU and you achieved to make it run, you may want to not disable neither OpenCL nor ADL.

Testing if it works

In the same directory /opt/cgminer/:

# ./cgminer --benchmark

You shouldn’t get errors, but see the speed of your CPU(s).

Launching it for real

Once you get credentials for a worker in a mining pool, you can do:

# ./cgminer -o http://worker.url.info/ -u worker-user -p worker-password

I use a screen or tmux session to keep it running even if I close the terminal, and at the moment I should say that I am getting already some BTCs :)

If you want to continue testing BitCoin, for example transfering coins, you can use one of my addresses as a recipient: 1GnquejgaLW7haKgtzdgUzYwRxPeF2cPEK. I will be very happy.

Comments