I am just a hobbyist when it comes to mining. There was not a complete tutorial on how to setup the GekkoScience 2-Pac to mine coins. I gathered the info and compiled this tutorial from watching videos and reading from various forums and websites. All credits to the OPs are linked at the bottom of this tutorial. If you need help after completing this tutorial, comment below.
I gather you have a Raspberry Pi (with Raspbian on a MicroSD) and a GekkoScience 2-Pac. If you have more than 2, it’s best if you use a powered USB hub.
Here are the instructions step by step. You can either use a connected keyboard and mouse with the RPI or you can enable ssh.
Optional:
- Enable SSH
- Launch Raspberry Pi Configuration from the Preferences menu
- Navigate to the Interfaces tab
- Select Enabled next to SS
- Click OK
- To login to the RPI via SSH, you must have an SSH client on your computer. An easy client is called PuTTY and is available for Windows, Mac, and Linux.
- Open PuTTY on your computer and put in the local IP address of your RPI. You will be prompted to input the default username (pi) and password (raspbian). The remainder of the commands can be done either by terminal on the RPI or SSH connection.
Let’s Get Started:
- Install Apache 2 Webserver and PHP
- Copy and execute the following command to install Apache2.
sudo apt-get install apache2 -y
- Copy and execute the following command to install PHP.
sudo apt-get install php libapache2-mod-php -y
- Copy and execute the following code to install PHP CLI, PHP cURL, Redis, Screen and Git.
sudo apt-get install redis-server git screen php7.0-cli php7.0-curl -y
- Copy and execute the following command to install Apache2.
- Install Minera to /var/www/html
- Copy and execute the following command to change directory to the webserver root.
cd /var/www/html
- Copy and execute the following command to clone Minera from github.
sudo git clone https://github.com/getminera/minera
- cd into the Minera folder.
cd minera
- Copy and execute the following command to install Minera. (If prompted, leave all options at default.)
sudo ./install_minera.sh
- Copy and execute the following command to change directory to the webserver root.
- Update the Repositories and Upgrade Raspbian on the RPI before going to the next step.
- Copy and execute the following command to Update the Raspbian Repositories.
sudo apt-get update
- Copy and execute the following command to Upgrade Raspbian.
sudo upgrade -y
- Copy and execute the following command to Update the Raspbian Repositories.
- Compile and Install cgminer with the correct drivers for the GekkoScience 2-Pac.
- Copy and execute the following command to install the necessary dependencies.
sudo apt-get install -y build-essential git libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev screen libtool automake pkg-config libjansson-dev
- Copy and execute the following command to create a work folder and cd to that folder.
sudo mkdir -p ~/git/vthoang; cd ~/git/vthoang
- Copy and execute the following command to clone the forked cgminer repository with the driver for the 2-Pac.
sudo git clone https://github.com/vthoang/cgminer.git
- Copy and execute the following command to cd to the cgminer folder.
cd cgminer
- Copy and execute the following command to set flags and enable the 2-Pac drivers.
sudo CFLAGS="-O2" ./autogen.sh --enable-gekko
- Copy and execute the following command to compile cgminer.
sudo make -j 2
- Copy and execute the following command to copy cgminer to the custom miner folder for Minera.
sudo cp cgminer /home/dh_jg336u/jonathanryangrice.com/minera/minera-bin/custom/cgminer-vthoang
- Copy and execute the following command to install the necessary dependencies.
- Configure Minera to mine.
- Open and point the browser on the RPI to localhost or the local IP address of the RPI from your computer.
(RPI IP Address)/minera
- Log into Minera using the default password (minera).
- In the left menu, click on Settings then Custom Miners.
- Enable your custom miner, cgminer-vthoang.
- Under Local Miner Settings, select your custom miner, cgminer-vthoang. Enable logging and Append JSON conf.
- Under Pools Settings, configure your pool. Make sure your new pool is the first option by dragging it above or removing the donation pool. (You must have a wallet and a pool account for the coin you’re going to mine. (ex. SlushPool, TheCoin.pw, etc.)
Some pool accounts require you to set up a worker before you start mining. You will usually use enter username.worker as the Pool Username and literally, anything, as the password unless otherwise specified by the pool Readme or Getting Started. - Plug your 2-Pac into your RPI. Click Save & Restart Miner.
- Open and point the browser on the RPI to localhost or the local IP address of the RPI from your computer.
If everything was set correctly, the light on your 2-Pac should start blinking and you can see what your 2-Pac is mining by Playing the Log on the Dashboard or view your worker hashrate on the pool website.
***NOTE*** lighttpd will try to take over and use Port 80 after installing Minera. Make sure you run the following in terminal to remove lighttpd before rebooting:
sudo apt-get remove lighttpd
Bonus:
You can overclock your 2-Pac. A powered USB Hub is required. Be careful because the 2-Pac chips will get very hot and you must have an adequate heatsink and/or fan. The following command can be used to overclock the 2-Pac. (You can increase the frequency of the 2-Pac from 50 to 500 in increments of 25.)
--gekko-2pac-freq 150
I overclock mine to 175 and only use a USB fan pointed at them. I assume no liability for damages if your 2-Pac overheats!
Be sure to Like and Share this tutorial by the links below and comment if you need any further assistance.
YouTube – GekkoScience 2Pac 11gh/s+ Raspberry PI 3b video by Brian Schott
RaspberryPi.org – Download Raspbian for Raspberry Pi
RaspberryPi.org – Setting up an Apache Web Server on a Raspberry Pi – Raspberry Pi Documentation
Minera Github – getminera/minera: Minera is a web interface to monitor and manage mining devices
Forked cgminer Github – vthoang/cgminer: ASIC and FPGA miner in c for bitcoin