OPTICXCESS — How to Install XMRig on Ubuntu or Debian
XMRig is a program for mining various cryptocurrencies, one of which is Monero. It is very important to always update this XMRig to support the latest algorithm applied by the coins being mined
Actually, all users can immediately use the compiled XMRig. But you can also compile or install independently to make sure the XMRig program used is still safe.
Either on Windows or Linux, you can do a manual installation. And this article will share the procedure for installing XMRig on Ubuntu and Debian Linux OS in detail according to your needs in adding crypto coins.
Install XMRig on Ubuntu and Debian
If in Windows the compilation process has to be done with Visual Studio, while on Linux, you can do it from the Terminal only. Of course, this requires several programs installed for the needs of the compile process later.
First of all to Install XMRig on Ubuntu or Debian, please install the required programs. Here is the command:
sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y
Then download XMRig from Github via GIT.
git clone https://github.com/xmrig/xmrig.git
Then go to the xmrig directory and create a new folder called build to put the compiled results later.
cd xmrig && mkdir build && cd build
Now we are preparing to compile the XMRig program using the CMAKE command.
And the last step is the XMRig compilation process.
Wait for the process to finish, it only takes a moment and the results will appear in the build directory that has been made.
Read Also : How to install HP Printer Assistant
Some Additional CMAKE Options
Here are some additional CMAKE options that you can use to configure XMRig before compiling:
- DWITH_LIBCPUID = OFF Disables libcpuid.
- DWITH_AEON = OFF Disables the CryptoNight-Lite algorithm and all similar variants.
- DWITH_SUMO = OFF Disables the CryptoNight-Heavy algorithm and all variants of its kind.
- DWITH_CN_GPU = OFF Disables the CryptoNight-GPU algorithm.
- DWITH_HTTPD = OFF Disables API and HTTP Server.
- DWITH_DEBUG_LOG = ON Enable LOG for debugging purposes.
- DWITH_TLS = OFF Disables SSL / TLS support.
- DWITH_ASM = OFF Disables Assembly Language support.
- DWITH_EMBEDDED_CONFIG = ON Enables internal JSON configuration.
- DBUILD_STATIC = ON Adds flag –static by default.
- DWITH_HWLOC = OFF Disables HWLOC support.
For example, here we want to compile XMRig by disabling CryptoNight-GPU and HTTP Server. So the CMAKE configuration will be like this.
cmake .. -DWITH_CN_GPU=OFF -DWITH_HTTPD=OFF
Now after that, just continue using the make command to start the compile process.
Configuring XMRig JSON
After XMRig is made, it will not be able to be opened immediately like xmr-stak, because it will appear a notification that no configuration has been saved. And the configuration in question is a config.json file which should be in the same directory where XMRig is located.
To make that configuration. Please use the Configuration Wizard feature provided by XMRig.
After getting the configuration, just save it in the config.json file and now try to open XMRig, surely the program can be used to mine perfectly.
Hopefully Our tutorial about Install XMRig on Ubuntu or Debian useful and good luck.