Compile and install CPUminer on Linux CentOS
Scrypt based crypto-currencies unlike Bitcoin’s SHA-256 is more reliant on memory, not processing efficiency. That is the reason those specialized hardwares developed for Bitcoin mining will not work with Litecoin and making CPU mining more effective.
This is a simple tutorial on the steps to compile and install CPUminer on Linux CentOS.
Compile CPUminer under Linux CentOS
- Setting locale
echo "export LC_ALL=en_US.UTF-8" >> /etc/profile
export LC_ALL=en_US.UTF-8
- Install dependencies
yum install git automake gcc make curl-devel
- Clone cpuminer
git clone https://github.com/pooler/cpuminer
- Compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
make
make install
Check run for success
After that, the miners will install to /usr/local/bin/. You can check the cpuminer version with this:
- Command
/usr/local/bin/minerd --version
- Result
cpuminer 2.3.2
libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Running cpuminer
- Command
./minerd –url=stratum+tcp://coinotron.com:3334 –userpass=username:password
- Result
If you have 8 thread, success mining will be like this.
[2013-12-18 13:01:24] thread 1: 363912 hashes, 6.07 khash/s
[2013-12-18 13:01:24] thread 6: 363612 hashes, 6.06 khash/s
[2013-12-18 13:01:24] thread 4: 363504 hashes, 6.06 khash/s
[2013-12-18 13:01:24] thread 7: 363432 hashes, 6.06 khash/s
[2013-12-18 13:01:24] thread 0: 365196 hashes, 6.09 khash/s
[2013-12-18 13:01:24] thread 2: 365580 hashes, 6.09 khash/s
[2013-12-18 13:01:24] thread 5: 364080 hashes, 6.06 khash/s
[2013-12-18 13:01:35] thread 3: 366072 hashes, 6.10 khash/s
[2013-12-18 12:34:03] accepted: 1/1 (100.00%), 48.55 khash/s (yay!!!)
FAQ / Troubleshooting
- My antivirus flags the Windows binary as malware.
That is a known false positive. More information here.
- When running
configure
I get the error “C compiler cannot create executables”.
Make sure you typed CFLAGS="-O3"
with a big O, not with a zero.
configure
chokes on something like “LIBCURL_CHECK_CONFIG(, 7.10.1, ,'”.
Make sure you have installed the development package for libcurl. If you have and you’re still getting the error when compiling from git, try compiling from tarball instead.
- I’m trying to connect to a Stratum server, but I get “HTTP request failed: Empty reply from server”.
Make sure you specified the correct protocol in the server URL (stratum+tcp://
)
- Is there any command-line option I can tweak to make it mine faster?
No. The miner automatically picks the best settings for the CPU it is run on.
- Will this miner use a lot of RAM when using the scrypt algorithm?
No, that’s a GPU thing.
my minerd command has a different syntax. ./minerd -o stratum+tcp://nonstopmine.com:3353 -u myusername -p mypassword
./minerd -help
Most of the syntax can be chucked about and mangled together.
TO THE MOON!
cool bro