Mining on Linux
Mining on Linux computer.
Mining on Linux is not straightforward like windows and the user has to compile the NexusMiner from source. This guide will help you setup mining on Linux. This guide is tailored for Ubuntu and Debian based distributions.
Make sure you install the latest GPU drivers from the manufacturer. Driver installation is outside the scope of this guide.
Install the dependencies
sudo apt install build-essential libboost-all-dev libdb-dev libdb++-dev libssl-dev libminiupnpc-dev libgmp-dev -y
Ubuntu does not have the latest version of boost. The install will be a manual process listed below:
This below is a direct link to the boost website:
Download the latest version of boost. At the time of writing the latest version boost is 1.78.0:
Extract boost installer to a new directory named Boost.
tar xzvf boost_1_69_0.tar.gz -C ~/Boost
Change into the Boost folder
Compile boost from source.
Copy the compiled files to the location specified with "–prefix command line option.
sudo ./b2 install
To verify boost version:
Nexus miner uses the latest version of cmake and Ubuntu does not ship with the latest version of cmake. If the distro has cmake version lower than 3.19, then follow the steps below to install latest version of cmake manually.
Go to the cmake downloads page (link below) and download the linux cmake script files with .sh extension
Change into the folder where the file is downloaded
Run the installer
First will be the licence, use “Enter” to scroll down or “spacebar” to scroll to the end, accept licence and then accept the location to extract, which will install the cmake binary. Change into the cmake/bin folder. Change the cmake folder name accordingly
Cmake is installed and ready for the next step.
Clone the NexusMiner repository
git clone --depth 1 https://github.com/Nexusoft/NexusMiner
git clone --branch v1.4 https://github.com/Nexusoft/NexusMiner
Change into the source code folder
Change into the cmake/bin folder installed in the step above. At time of writing the cmake version is 3.21.2, change the name accordingly.
Run cmake to build the NexusMiner executable. <pathtosource> is the path to the NexusMiner folder and <pathtobuildfolder> is the path to NexusMiner/build. Use the option
"-DWITH_PRIME=On"to include for prime mining support during compile.
./cmake -S <pathtosource> -B <pathtobuildfolder> -DCMAKE_BUILD_TYPE=Release -DWITH_PRIME=On
./cmake -S ~/NexusMiner -B ~/NexusMiner/build -DCMAKE_BUILD_TYPE=Release -DWITH_PRIME=On
Cmake will build the prebuilt make binaries and keep them in prebuilt binaries folder "/build". Change into build folder.
To compile use:
This will compile and create the NexusMiner executable.
Create a folder for the NexusMiner.
Copy the NexusMiner to the
cp NexusMiner ~/Miner
To configure the miner, check the link below:
To run the miner change into the miner directory.
For solo mining start the wallet, login and then start the miner.
Hope you enjoyed the guide!!