Tag Archives: zcash mining in ubuntu

Install Ubuntu 16.04, CUDA 8.0 and EwbfMiner for zCash mining with nVidia GPU

===============================================================

// Install Ubuntu Server 16.04.2

// On OK go next

// Set static IP by editing: /etc/network/interfaces

$ cd /etc/network

$ sudo nano interfaces

// Change from:

auto lo

iface lo inet loopback

 

auto enp2s0f0 (name of interface)

iface enp2s0f0 inet dpch

// Change to:

auto lo

iface lo inet loopback

 

auto enp2s0f0 (name of interface)

iface enp2s0f0 inet statis

address 192.168.0.10

netmask 255.255.255.0

gateway 192.168.0.1

dns-nameservers 8.8.8.8 8.8.4.4

// Save and exit.

//

// Change default SSH port:

$ cd /etc/ssh

$ sudo nano sshd_config

// Change Port 22 into Custom Port.

// OK: now the server can be access remotely by SSH at 192.168.0.10:Newport

// Reboot server (for static IP get effect):

$ sudo nano reboot

//

// Install CUDA to support nvidia graphic cards

// Instruction (http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#axzz4lk34TixW)

// Verify You Have a CUDA-Capable GPU

$ lspci | grep -i nvidia

// Verify the system has gcc installed

$ gcc –version

// If not installed yet. Then install it:

$ sudo apt install gcc

// ok with gcc 5.4.0

// Verify the system has the correct Kernel Headers and Development Packages installed

$ uname -r

// (if not installed) The kernel headers and development packages for the currently running kernel can be installed with:

$ sudo apt-get install linux-headers-$(uname -r)

//

// Now download cuda at https://developer.nvidia.com/cuda-downloads. –> Menu: Linux > x86_64 > Ubuntu > 16.04 > deb (local)

$ mkdir apps && cd apps

$ wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

// Install repository meta-data (unpack):

$ sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb

// Update the Apt repository cache

$ sudo apt-get update

// Install CUDA

$ sudo apt-get install cuda

// on ok go next

//

// Post CUDA installation actions:

// Environment Setup (must do)

$ sudo nano .profile

// The PATH variable needs to include /usr/local/cuda-8.0/bin

// To add this path to the PATH variable in .profile:

PATH=”$PATH:/usr/local/cuda-8.0/”

PATH=”$PATH:/usr/local/cuda-8.0/bin”

LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib64/stubs”

CUDA_CUDART_LIBRARY=”/usr/local/cuda-8.0/lib64/libcudart.so”

// OK

//

// To install the Display Driver, the Nouveau drivers must first be disabled.

// Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:

$ cd /etc/modprobe.d

$ sudo nano blacklist-nouveau.conf

// Add 2 below lines:

blacklist nouveau

options nouveau modeset=0

// Save and exit file editing.

//

// Install nVidia Toolkit and Drivers

$ sudo apt install nvidia-cuda-toolkit

// Check if driver of nvidia GPU is installed correctly:

$ nvidia-smi

// OK

===============================================================

// Install ewbfminer:

// Source:  https://github.com/nanopool/ewbf-miner/releases

$ mkdir ewbfminer && cd ewbfminer

$ wget https://github.com/nanopool/ewbf-miner/releases/download/v0.3.4b/Zec.miner.0.3.4b.Linux.Bin.tar.gz

// Unzip and Install downloaded file in ewbfminer folder:

$ tar -xzf Zec.miner.0.3.4b.Linux.Bin.tar.gz

// Config ewbfminer in miner.cfg

$ sudo nano miner.cfg

# main server

[server]

server us.zec.slushpool.com

port   4444

user   xxxUser.worker

pass   password

 

#additional server 1

[server]

server equihash.eu.nicehash.com

port   3357

user   xxxAddress.worker

pass   password

// Config start.sh to include only below line:

$ sudo nano start.sh

./miner –config miner.cfg

// Save and exit

// OK

//

// Run ewbfminer:

$ cd apps/ewbfminer

$ ./start.sh

// Run ewbfminer inside screen session to allow closing current ssh terminal:

$ screen

$ cd apps/ewbfminer

$ ./start.sh

$ Ctrl-A   -then-  d  (to exit ‘screen’ session)

// Close ssh terminal

 

===============================================================

Advertisements