How to mine cryptocurrency with a GPU server in 30 minutes
fr:Comment miner une cryptomonnaie avec serveur dédié GPU en 30 minutes
en:How to mine cryptocurrency with a GPU server in 30 minutes
it:Come fare del mining per criptomonete con un server dedicato GPU in soli 30 minuti
es:Como minar una crypto moneda con un servidor dedicado GPU en 30 minutos
INTRODUCTION Cryptocurrency
In this tutorial we will present how to mine Bitcoin or another cryptocurrency with GPU (or CPU) on a dedicated server under Ubuntu 16.04.
This Server can be rigged with one or several NVidia GeForce GTX 1070 cards to process the algorithms used in these blockchains.
In this case, we’re using a XEON GPU server from Ikoula’s lineup with one graphic card to mine AltCoins.
PREREQUISITES
It may be easier for some people to use a VNC client for the install : https://doc.ubuntu-fr.org/vnc
Nvidia 387 Drivers or latest stable release : https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
CUDA 9 or latest stable release : https://developer.nvidia.com/cuda-downloads
CCMiner or any other miner : https://github.com/tpruvot/ccminer
INSTALLATION
Connect to your XEON GPU server through SSH with your favorite ssh client.
Update your system.
$ sudo apt-get update
$ sudo apt-get upgrade
Download Nvidia Drivers
First we must add the repository for all ‘’’Nvidia’’’ drivers, then install the drivers we need :
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get update
$ sudo apt-get install nvidia-387
This install may take a few minutes, we recommend you make a cup of coffee for the next steps .
Now we need to reboot the server for our GPU to be recognized, and reconnect :
$ sudo shutdown -r now
Everything is ready for the next step. We can verify that our GPU is setup correctly, and check their state, with the ‘’’Nvidia-smi’’’ tool. Just type :
$ nvidia-smi
Download CUDA Drivers
Go to the following website : https://developer.nvidia.com/cuda-downloads Select “Operating System” -> Linux - > x86_64 -> Ubuntu -> 16.04 -> deb(local)” Copy the link to the file to download (Approx. 1,2Gb) or download directly if you’re using a VNC : In our case (without VNC) :
$ wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
The Installation Instructions for the Base Installer are described right underneath the download link in 4 steps.
Please change the cuda-repo.. file according to the version you’ve chosen !
In our case :
$ sudo dpkg -i cuda-repo-ubuntu1604-9-0-local-9.0.176-1_amd64.deb
$ sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
Now we can install CUDA :
$ sudo apt-get update
$ sudo apt-get install cuda
We’re done here, our graphic cards are setup correctly with the latest drivers . We can now install our miner software .
Download CCMiner
First we need to prepare the libraries and dependencies, and update them, so we can install our cryptocurrency mining software :
$ sudo apt-get build-essential libcurl4-openssl-dev make automake git gcc-5 libjansson-dev libssl-dev autotools-dev
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
Now to install CCMiner :
$ git clone https://github.com/tpruvot/ccminer
$ cd ccminer
$ ./autogen.sh
$ ./configure CFLAGS=”-O3 -Wall -march=native”
Before we build we must make sure the miner is optimised for our ‘’’GeForce GTX 1070’’’ - and according to the readme and manual ( https://github.com/tpruvot/ccminer/wiki/nvcc_ARCH-=--gencode=arch=compute_20,code=%22sm_21,compute_20%22 ) we see our GPU is compatible with CUDA 8 (at least) and that our “nvcc flag” is “sm_61 / compute_61” which we will change in the Makefile.am file aux lignes 114, 115, 116, 117, 118, 119, 179, 184, 187, 190, 193, 196.
For the first 4 lines you can just add a # to comment the line . Make the changes everywhere required.
Voilà, the miner is optimized . We can finally install :
$ ./build.sh
Now your cryptocurrency mining software is installed , you can create a script to launch the miner quickly :
$ touch launcher.sh && chmod +x launcher.sh
$ vi launcher.sh
Your script might look a little like this :
#!/bin/bash
./ccminer -a algorithm -i 2 -o stratum+tcp://pool.mining.com:12016 -u user -p x
$ ./ccminer --help
Then, to launch your script, type :
$ ./launcher.sh
CONCLUSION
There you go ! In less than 30 minutes , your XEON GPU server hosted by Ikoula is mining bitcoin, ethereum, litecoin, or any other cryptocurrency for a blockchain.
Was this article useful ?
Enable comment auto-refresher