With the recent upsurge in Monero popularity and price, now is the perfect opportunity to begin exploring and mining the cryptocurrency. If you're not familiar with Monero, it's a cryptocurrency with privacy built in.
Monero uses a cryptographically sound system that allows you to send and receive funds without your transactions being publicly visible on the blockchain (the distributed ledger of transactions). This ensures that your purchases, receipts, and other transfers remain private by default.
If you have some spare computing power, or a decent GPU, you can contribute some hashing power to the network and earn some Monero yourself.
This tutorial assumes you're running a version of Ubuntu. If you don't have Ubuntu, you can install it on your machine for free here.
ccminer-cryptonight is a fork of ccminer that runs on the CUDA architecture and takes advantage of your Nvidia video card.
Download the source code for ccminer-cryptonight
Update the system
sudo apt-get update && sudo apt-get -y dist-upgrade
sudo apt-get -y install gcc g++ build-essential automake linux-headers-$(uname -r) git gawk libcurl4-openssl-dev libjansson-dev xorg libc++-dev libgmp-dev python-dev
Install the nvidia display driver
cd && wget http://us.download.nvidia.com/XFree86/Linux-x86_64/352.41/NVIDIA-Linux-x86_64-352.41.run sudo chmod +x NVIDIA-Linux-x86_64-352.41.run sudo ./NVIDIA-Linux-x86_64-352.41.run --accept-license --no-questions --disable-nouveau --no-install-compat32-libs rm NVIDIA-Linux-x86_64-352.41.run
sudo echo 'GRUB_CMDLINE_LINUX="nomodeset"' >> /etc/default/grub sudo update-grub sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration # flags enable OC and fan controls. via: https://bitcointalk.org/index.php?topic=826901.msg12279696#msg12279696
cd && wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb rm cuda-repo-ubuntu1404_6.5-14_amd64.deb sudo apt-get update sudo apt-get -y install cuda-toolkit-6-5
Note: you can skip having to read over the entire agreement by pressing ctrl+c after the last command above.
sudo usermod -a -G video $USER echo "" >> ~/.bashrc echo "export PATH=/usr/local/cuda-6.5/bin:$PATH" >> ~/.bashrc echo "export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc
Make the deviceQuery sample. This is used to verify cuda works
cd /usr/local/cuda/samples/1_Utilities/deviceQuery && sudo make
If you see all of your cards listed, and the last line says "Result = PASS" you're good to go.
cd ccminer-cryptonight_20140926 ./autogen.sh ./configure make
We'll be mining with a pool I like called MoneroHash. It's relatively small, which means payouts will be larger (but might take longer).
Simply start ccminer to begin mining:
ccminer -o stratum+tcp://monerohash.com:3333 -u YOUR_WALLET_ADDRESS -p x
If everything went smoothly, you'll see output like this:
[2016-08-24 17:48:52] Using JSON-RPC 2.0 [2016-08-24 17:48:52] 1 miner threads started, using 'cryptonight' algorithm. [2016-08-24 17:48:52] Starting Stratum on stratum+tcp://monerohash.com:3333 [2016-08-24 17:48:52] GPU #0: GeForce GTX 970 (13 SMX), using 40 blocks of 8 threads [2016-08-24 17:48:52] Pool set diff to 5000 [2016-08-24 17:48:52] Stratum detected new block [2016-08-24 17:48:57] GPU #0: GeForce GTX 970, 76.20 H/s [2016-08-24 17:49:10] GPU #0: GeForce GTX 970, 350.35 H/s [2016-08-24 17:49:10] accepted: 1/1 (100.00%), 350.35 H/s (yay!!!)
Thanks to Zach Shiner for his UbuntuMiner script.