Install and Configure xmrig for Monero XMR Crypto Mining
Ensure you have created and activated an account on https://minergate.com. You will need your minergate.com UserID before proceeding.
Create a directory for xmrig under /opt:
mkdir /opt/xmrigDownload attached xmrig-linux.zip and extract to the /opt/xmrig directory you created above:
unzip xmrig-linux.zip -d /opt/xmrigEdit /opt/xmrig/config.json file and under the following section:
"pools": [
        {
            "algo": null,
            "coin": null,
            "url": "xmr.pool.minergate.com:45700",
            "user": "12345678",
            "pass": "x",
            "rig-id": null,
            "nicehash": false,
            "keepalive": false,
            "enabled": true,
            "tls": false,
            "tls-fingerprint": null,
            "daemon": false,
            "socks5": null,
            "self-select": null
        }
    ],set the 123456 in the "user": "12345678" section to your Minergate.com UserID.
Make /opt/xmrig/xmrig executable:
chmod +x /opt/xmrig/xmrigMove the xmrig.service file that was included in the xmrig-linux.zip file to /etc/systemd/system:
mv /opt/xmrig/xmrig.service /etc/systemd/system/Create a user for xmrig:
sudo adduser xmrigSet a password for the xmrig user and answer the resultant prompts
Give xmrig user root privileges:
usermod -G sudo xmrigEnable the xmrig service:
sudo systemctl enable --now xmrigStart the xmrig service:
sudo systemctl restart xmrigEnsure xmrig service has started:
systemctl status xmrigIf the service is started, the output should be similar to below:
● xmrig.service - XMRig Monero Miner
   Loaded: loaded (/etc/systemd/system/xmrig.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-02-19 21:17:30 UTC; 11min ago
 Main PID: 7516 (xmrig)
    Tasks: 14 (limit: 4915)
   CGroup: /system.slice/xmrig.service
           └─7516 /opt/xmrig/xmrig --config=/opt/xmrig/config.json --log-file=/opt/xmrig/xmrig.log
View xmrig service logs:
journalctl -u xmrig
