• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

[Noob-Proof] How To Install Cpuminer under Ubuntu/Linux

GreenRaccoon23

New member
just_mike posted an awesome tutorial, which points to here: http://cpucoinlist.com/how-to/mine-darkcoin/

I'm going to expand on the steps for installing and setting up the CPU miner.

1- Check if your processor supports the new AES-NI instruction sets. You can do this one of two ways (Method A is easier if you know the model of your processor):
  • Method A
    -If your processor is listed on this page, it supports the AES-NI instruction set:
    http://ark.intel.com/search/advanced/?AESTech=true
  • Method B
    -Run this command in Terminal:
    Code:
    grep aes /proc/cpuinfo
    --If nothing shows up, your processor DOESN'T support the AES-NI instruction set.
    --If you DO see line(s) containing the word "aes", your processor DOES support the AES-NI instruction set.
2- If your processor supports the AES-NI instruction set, jump to post two of this thread. If it doesn't, just keep following this post.

For processors that DON'T support AES-NI

3- Update your computer and install dependencies. Open up Terminal with ctrl+alt+t. Then copy (ctrl+c) and paste (ctrl+SHIFT+v) this:
Code:
sudo aptitude update
sudo aptitude upgrade -y
sudo aptitude install -yr git curl unzip automake autoconf dh-autoreconf build-essential pkg-config openssh-server screen libtool libcurl4-openssl-dev libtool libncurses5-dev libudev-dev

4- Download version 1.2c of cpuminer (this version is best for processors that DON'T support the AES-NI instruction set)
Code:
cd ~
git clone https://github.com/ig0tik3d/darkcoin-cpuminer-1.2c.git
5- Install cpuminer (compile, make, and install)
Code:
cd ~/darkcoin-cpuminer-1.2c
chmod +x autogen.sh
./autogen.sh
./configure CFLAGS="-O3"
make
sudo make install
6- Create a script with this step. This script will run cpuminer with your mining preferences. It's pretty handy.
Code:
cd ~
gedit darkcpu
7- An empty file should pop up. Copy and paste this in there:
Code:
#!/bin/bash
cd ~/darkcoin-cpuminer-1.2c
./minerd -a X11 -o # -u # -p #
8- Don't close the file yet. First replace the "#" signs with what you need. If you have no idea what to put for "#", keep reading. If you know what to put, then skip to step 8.
  • "-a" stands for "algorithm." You'll always want X11. Don't change this.
  • "-o" stands for your pool's address and port. "stratum+tcp://address.com:port" Find that on your pool's website (usually under "Help" and then "Getting started"). If you don't have a pool yet, here's a list: https://www.darkcoin.io/mining.html This is what mine is:
    Code:
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090
  • "-u" stands for your personal username that you use to login on your pool's website. BUT "-u" also includes a worker name that you have to create on your pool's website. The format looks like this: “-u username.worker”. On your pool's website, you can have ONE username but MANY different workers. Think of it this way. The "username" represents "you" and the "workers" are the "slaves" that work for you. :eek: Your username identifies you, and each worker represents each computer/processor that's mining for you. If you haven't created a worker on your pool's website, do that now.

    So if the username on my pool is "GreenRaccoon23," and I created a worker on there named "chucknorris," it would look like this:
    Code:
     ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris
  • "-p" stands for your password: your WORKER'S password, NOT your username's password. You set this up on your pool's website.

    So if the password for my worker "chucknorris" is "knowsvictoriassecret," this is what it would look like:
    Code:
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris -p knowsvictoriassecret
  • Here's the basic format for the whole line:
    Code:
    ./minerd -a X11 -o stratum+tcp://your.pool.address:port -u username.worker -p password
    Here's an example format for the whole file:
    Code:
    #!/bin/bash
    cd ~/darkcoin-cpuminer-1.2c
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris -p knowsvictoriassecret
9- Save the file and close it.
10- Make the script executable with this command:
Code:
chmod +x darkcpu

Run cpuminer
11-
Running cpuminer is easy once you've made the "darkcpu" script explained above. Just change directory to your home folder and run the script:
Code:
cd ~
./darkcpu
12- Now you're making currency by doing nothing. :cool: When you want to stop it, press "ctrl+c". To run it again, repeat step 11. To change cpuminer's settings, go through steps 6-9 again.

(If you want to install sgminer for GPU mining also, I have another guide: https://darkcointalk.org/threads/no...mine-darkcoin-under-linux-ubuntu-64-bit.1813/)
 
Last edited by a moderator:
For processors that DO support AES-NI

3- Update
your computer and install dependencies. Open up Terminal with ctrl+alt+t. Then copy (ctrl+c) and paste (ctrl+SHIFT+v) this:
Code:
sudo aptitude update
sudo aptitude upgrade -y
sudo aptitude install -yr git curl unzip gedit automake autoconf dh-autoreconf build-essential pkg-config openssh-server screen libtool libcurl4-openssl-dev libtool libncurses5-dev libudev-dev
4- Download version 1.3 of cpuminer (this version is best for processors that DO support the AES-NI instruction set)
Code:
cd ~
git clone https://github.com/elmad/darkcoin-cpuminer-1.3-avx-aes.git
5- Install cpuminer (compile, make, and install)
Code:
cd ~/darkcoin-cpuminer-1.3-avx-aes
chmod +x autogen.sh
./autogen.sh
./configure CFLAGS="-O3 -march=native"
make
sudo make install
6- Create a script with this step. This script will run cpuminer with your mining preferences. It's pretty handy.
Code:
cd ~
gedit darkcpu
7- An empty file should pop up. Copy and paste this in there:
Code:
#!/bin/bash
cd ~/darkcoin-cpuminer-1.3-avx-aes
./minerd -a X11 -o # -u # -p #
8- Don't close the file yet. First replace the "#" signs with what you need. If you have no idea what to put for "#", keep reading. If you know what to put, then skip to step 8.
  • "-a" stands for "algorithm." You'll always want X11. Don't change this.
  • "-o" stands for your pool's address and port. "stratum+tcp://address.com:port" Find that on your pool's website (usually under "Help" and then "Getting started"). If you don't have a pool yet, here's a list: https://www.darkcoin.io/mining.html This is what mine is:
    Code:
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090
  • "-u" stands for your personal username that you use to login on your pool's website. BUT "-u" also includes a worker name that you have to create on your pool's website. The format looks like this: “-u username.worker”. On your pool's website, you can have ONE username but MANY different workers. Think of it this way. The "username" represents "you" and the "workers" are the "slaves" that work for you. :eek: Your username identifies you, and each worker represents each computer/processor that's mining for you. If you haven't created a worker on your pool's website, do that now.

    So if the username on my pool is "GreenRaccoon23," and I created a worker on there named "chucknorris," it would look like this:
    Code:
     ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris
  • "-p" stands for your password: your WORKER'S password, NOT your username's password. You set this up on your pool's website.

    So if the password for my worker "chucknorris" is "knowsvictoriassecret," this is what it would look like:
    Code:
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris -p knowsvictoriassecret
  • Here's the basic format for the whole line:
    Code:
    ./minerd -a X11 -o stratum+tcp://your.pool.address:port -u username.worker -p password
    Here's an example format for the whole file:
    Code:
    #!/bin/bash
    cd ~/darkcoin-cpuminer-1.3-avx-aes
    ./minerd -a X11 -o stratum+tcp://mine1.coinmine.pl:16090 -u GreenRaccoon23.chucknorris -p knowsvictoriassecret
9- Save the file and close it.
10- Make the script executable by running this:
Code:
chmod +x darkcpu

Run cpuminer
11-
Running cpuminer is easy once you've made the "darkcpu" script explained above. Just change directory to your home folder and run the script:
Code:
cd ~
./darkcpu
12- Now you're making currency by doing nothing. :cool: When you want to stop it, press "ctrl+c". To run it again, repeat step 11. To change cpuminer's settings, go through steps 6-9 again.

(If you want to install sgminer for GPU mining also, I have another guide: https://darkcointalk.org/threads/no...mine-darkcoin-under-linux-ubuntu-64-bit.1813/)
 
Last edited by a moderator:
Code:
sudo aptitude update
sudo aptitude upgrade -y
sudo aptitude install -yr git curl unzip automake autoconf dh-autoreconf build-essential pkg-config openssh-server screen libtool libcurl4-openssl-dev libtool libncurses5-dev libudev-dev
I need to give you a heads up. This procedure is not "Noob-Proof!"

The above commands don't account for the fact that occasionally aptitude gets squirrelly and decides to remove things it shouldn't. If the user has any kind of quirk in his package configuration, this can trigger a dependency avalanche and uninstall great swaths of their system! And you're telling them to add the '-y' switch so that it will automatically approve of any actions that are proposed without giving the user a chance to respond! :eek:

Also, by recommending aptitude, you're ignoring the general suggestion to use only one or the other, aptitude or apt, to maintain your system. On many systems apt is still the default tool.

I recommend you modify your guide to suggest:

a) That they use their distro's standard package management system to make sure the list of packages are installed and configured...

b) Or that they use the -s switch to SIMULATE the install command and examine the terminal output for errors or massive un-installations before executing it for real!

How do I know all this? Because on MY system the attempt to install did exactly that -- it tore out over 100 packages plus their dependencies, for a total of over 350 items. :mad: It left me with a zombie session running, barely, with no networking, no desktop icons or file browser, and many other packages and services missing.

It took several days and a major review of command-line arcana to rebuild my system. Fortunately my data and configuration files were intact, so I was able to restore them on the new install. I was also able to piece together a list of my user-installed packages and batch-restore them as well.

Of course it's nothing that a diligent backup schema wouldn't have reduced to a minor inconvenience... but how many "noobs" have one of those in place, anyway?

Then I managed to compile and run cpuminer, without a hitch. :tongue:

I hope you'll edit your guide to reflect a bit more caution. Thank you for writing it. It did get me to where I wanted to go, after a fashion. :oops:

M.
 
Hi, I've really appreciated these tutorials. I installed a GPU-miner only to realize my card didn't have enough memory. Now I'm trying to cpu mine. I get stuck on on the 'make step' in step 5. I get


make all-recursive
make[1]: Entering directory `/home/m/darkcoin-cpuminer-1.2c'
Making all in compat
make[2]: Entering directory `/home/m/darkcoin-cpuminer-1.2c/compat'
make[3]: Entering directory `/home/m/darkcoin-cpuminer-1.2c/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/m/darkcoin-cpuminer-1.2c/compat'
make[2]: Leaving directory `/home/m/darkcoin-cpuminer-1.2c/compat'
make[2]: Entering directory `/home/m/darkcoin-cpuminer-1.2c'
make[2]: Leaving directory `/home/m/darkcoin-cpuminer-1.2c'
make[1]: Leaving directory `/home/m/darkcoin-cpuminer-1.2c'


I've already made sure my libtools are update and also Janson. Any ideas what's going wrong?
 
Back
Top