mining monero in osx using xmring
There are a couple of things you need for mining monero in osx using xmring:
You have to make sure you have homebrew installed (for dependencies), and you need a wallet to put your mined monero in.
Once you have homebrew installed, you can now install the dependencies for xmrig in a terminal using brew:
brew install cmake libuv libmicrohttpd
Next, clone the repo and build from github. The link below is for the cpu miner, but there are nvidia gpu and amd gpu versions available too
git clone https://github.com/xmrig/xmrig.git cd xmrig mkdir build cd build cmake .. make
You now have a binary ready to run. This is where the fun starts
You’ll need to pick a mining pool (I use supportxmr.com)
supportxmr.com has a config generator, which you can use to run your miner
Simply select your hardware from the dropdown list, fill in a miner name and add your email address (you dont need to create a login yet
– you only need that after you have mined some monero). You’ll see the config generated at the bottom of the page.
Copy the config and paste it into a text file (config.txt) in the same directory as your xmrig binary) then run xmrig.
You should be mining (and see an output like the image above)!
I dont use the config, instead I have a bash script that I run which has all the parameters inside:
Create a new bash script, and paste the following (you can change the parameters if you need)
#!/bin/sh xmrig -v 1 -t 2 -o pool.supportxmr.com:5555 -u your_xmr_wallet_id -p miner_name:email@example.com -k─
Once you change the parameters for your miner name, email address and xmr wallet ID, you can start the script and it will run and show your mining output!
mining monero in osx using xmring: cli options
-a, --algo=ALGO cryptonight (default) or cryptonight-lite -o, --url=URL URL of mining server -O, --userpass=U:P username:password pair for mining server -u, --user=USERNAME username for mining server -p, --pass=PASSWORD password for mining server -t, --threads=N number of miner threads -v, --av=N algorithm variation, 0 auto select -k, --keepalive send keepalived for prevent timeout (need pool support) -r, --retries=N number of times to retry before switch to backup server (default: 5) -R, --retry-pause=N time to pause between retries (default: 5) --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1 --cpu-priority set process priority (0 idle, 2 normal to 5 highest) --no-huge-pages disable huge pages support --no-color disable colored output --donate-level=N donate level, default 5% (5 minutes in 100 minutes) --user-agent set custom user-agent string for pool -B, --background run the miner in the background -c, --config=FILE load a JSON-format configuration file -l, --log-file=FILE log all output to a file --max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75) --safe safe adjust threads and av settings for current CPU --nicehash enable nicehash support --print-time=N print hashrate report every N seconds -h, --help display this help and exit -V, --version output version information and exit