CentOS 7

You can use official binary downloads for this OS, with linux-x64 or linux-static-x64 suffixes.
Default compiler (gcc 4.8) is pretty old, feature environment variables will not be available if the miner compiled on this OS, this restriction not applied for official downloads because it uses a newer compiler.

Basic build

Basic build is good for local machine, because it is easy, but if you need to run the miner on other machines please take a look at advanced build.

1. sudo yum install -y epel-release
2. sudo yum install -y git make cmake gcc gcc-c++ libstdc++-static libuv-static hwloc-devel openssl-devel
3. git clone https://github.com/xmrig/xmrig.git
4. mkdir xmrig/build && cd xmrig/build
5. cmake ..
6. make -j$(nproc)

Advanced build

We use build_deps.sh script to build recent versions of libuv, openssl and hwloc as static libraries in addition we must use cmake3 otherwise cmake will not find openssl.

1. sudo yum install -y epel-release
2. sudo yum install -y git make cmake3 gcc gcc-c++ libstdc++-static automake libtool autoconf
3. git clone https://github.com/xmrig/xmrig.git
4. mkdir xmrig/build
5. cd xmrig/scripts && ./build_deps.sh && cd ../build
6. cmake3 .. -DXMRIG_DEPS=scripts/deps
7. make -j$(nproc)

Use command ldd xmrig to verify binary dependencies.

Other versions