Skip to content

Instantly share code, notes, and snippets.

@vietdien2005
Last active August 24, 2024 07:52
Show Gist options
  • Save vietdien2005/db91091820b00fcf4c9706c6b08e5440 to your computer and use it in GitHub Desktop.
Save vietdien2005/db91091820b00fcf4c9706c6b08e5440 to your computer and use it in GitHub Desktop.
install bfgminer with cpu mining on Ubuntu 16.04

Install

  sudo apt-get install bfgminer
  • Unfortunately the version was not up to date, and was not compiled for mining scrypt-based coins like Litecoin. Here is how I built BFGMiner with this support.

  • Install the dependencies:

  sudo apt-get install build-essential autoconf libtool libjansson-dev libcurl4-gnutls-dev libncurses5-dev libudev-dev libusb-1.0-0-dev yasm uthash-dev
  • Get a copy of the latest version and prepare the environment:
  cd ~
  git clone https://github.com/luke-jr/bfgminer.git
  cd bfgminer/
  ./autogen.sh
  • Then I built it while enabling scrypt and CPU optimizations:
  ./configure --enable-cpumining --enable-scrypt
  sudo make
  sudo make install
  • Then create a config file in ~/.bfgminer/bfgminer.conf :
{
"pools" : [
  {
    "url" : "stratum+tcp://coinotron.com:3334",
    "user" : "foo",
    "pass" : "password",
    "pool-priority" : "0"
  },
  {
    "url" : "https://p2pool.org:9327",
    "user" : "foo",
    "pass" : "password",
    "pool-priority" : "1"
  }
],
  "algo" : "scrypt",
  "api-port" : "4028",
  "expiry" : "120",
  "expiry-lp" : "3600",
  "gpu-dyninterval" : "7",
  "log" : "5",
  "no-pool-disable" : true,
  "no-show-processors" : true,
  "no-show-procs" : true,
  "queue" : "1",
  "scan-time" : "60",
  "scrypt" : true,
  "skip-security-checks" : "0",
  "submit-stale" : true,
  "temp-hysteresis" : "3",
  "shares" : "0",
  "kernel-path" : "/usr/local/bin"
}
  • And your ready to launch the miner:
  ~/bfgminer/bfgminer
@nymbuzcumulus
Copy link

Hi, I have installed it, but on bfgminer, I am not being able to make it work with bitcoin core.. neither my asics can find the server... do you have any chance and will to help ?
I have 50 miners, capable of doing 3.5 PH/// The task is to find Blocks as many as possible then get rewards.... If you help me to configure and works I am willing to share with you on the first Block ... !

@nymbuzcumulus
Copy link

[2024-08-24 02:46:09] Pool 0 slow/down or URL or credentials invalid
[2024-08-24 02:46:57] Pool 1 slow/down or URL or credentials invalid
[2024-08-24 02:46:58] No servers were found that could be used to get work from.
[2024-08-24 02:46:58] Please check the details from the list below of the servers you have input
[2024-08-24 02:46:58] Most likely you have input the wrong URL, forgotten to add a port, or have not set
up workers
[2024-08-24 02:46:58] Pool: 0 URL: http://192.168.0.147:8333 User: nymbuz Password: BTC
[2024-08-24 02:46:58] Pool: 1 URL: http://localhost:8333/#getcbaddr#allblocks User: nymbuz Password:
BTC
[2024-08-24 02:46:58] Press any key to exit, or BFGMiner will try again in 15s.

@nymbuzcumulus
Copy link

image

@nymbuzcumulus
Copy link

so it seems there are inbound calls from bfgminer... but the very same one says no connection and bla bla bla... really need help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment