My plan is to do a "net" install of Debian, basically the bare minimum, then figure out what I need to type next. Essentially a "step-by-step" from complete scratch/zero. It's in a VM, so no biggie if I have to do over and over just to get it right.
I've been doing Debian minimal netinstalls as part of job for 16 years.
You might want to set up sudo first, debian doesn't install it for you (ubuntu does).
so login as root first, "apt-get install sudo", then run "visudo" to edit /etc/sudoers and add yourself there, then log out and login as yourself.
Then run "sudo apt-get install build-essential" -- it will install essential stuff needed to have a C/C++ compiler that can compile.
After that it boils down to what you need to compile, in case of cpuminer-opt it's "sudo apt-get install libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev automake".
The reason why I suggest using sudo is because doing everything as root is _very_ bad practice --
http://unix.stackexchange.com/questions/52268/why-is-it-a-bad-idea-to-run-as-rootIn fact, even for installing most software you don't need root, for example my package manager revolves precisely around that --
https://github.com/hmage/norm