Introduction
Mining cryptocurrency is an interesting and rewarding process. Mining crypto means you are providing the computational power to solve the huge mathematical equations in the blockchain. To solve the problems you need to provide either CPU ( central processing unit ) or GPU ( graphics processing unit.
The Raspberry pi 4 uses CPU mining power, so to run the mining process we need to install one software called Xmrig. So in this article you can get a clear idea about How to setup Xmrig software on raspberry pi 4 to start mining.
If you have already installed a Raspberry pi OS on your raspberry pi 4 we can start installing the mining software. The raspberry pin is ARM based architecture so we need to install the ARM supporting files to it.
Installing Xmrig on Raspberry pi 4 with Pre-Installed Raspberry Pi OS
If you are not installing the Raspberry pi os on your board, you can t install the Xmrig. So install the Raspberry pi OS ( desktop or lite mode) to start installing xmrig. Installing raspberry pi OS is very ebay task so i don’t explaining and domnt wasting your time for that.
You need to open your Raspberry pi terminal through SSH or direct desktop mode. After opening the terminal, enter the code without any mistakes. After running this code you can successfully install the xmrig on your raspberry pi board.
Steps to Install Xmrig
Follow the steps, you can copy and past the codes to the raspberry pi terminal window to avoid any mistakes happening from your side.
Packages
The Xmrig software is not run without the packages , so this is the supporting code to run the xmrig fine on your raspy pi.
sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
This code will all required package for xmrig.
Installing Xmrig
git clone https://github.com/xmrig/xmrig.git
mkdir xmrig/build && cd xmrig/build
cmake ..
make -j4
Now yo are done. Successfully installed the xmrig on your raspberry pi 4. To run the mining process you need to enter this line of code with your wallet address and mining pool details, just replace the wallet address and mining url with what you want.
Start Mining using This Piece of Code
./xmrig -a rx/0 -o miningpool:2211 -u wallet aadress -t 4
- -a rx/0 is mining algorith of morero change with what you want
- miningpool:2211 mining address and port of the pool change it for your use
- replace wallet address with your wallet address.
- -t 4 the cpu threads using.