Skip to content

Instantly share code, notes, and snippets.

@Dimtree
Created March 18, 2022 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dimtree/75b9c53b74dade74893928099566d212 to your computer and use it in GitHub Desktop.
Save Dimtree/75b9c53b74dade74893928099566d212 to your computer and use it in GitHub Desktop.
build xmrig from source on Debian
#!/bin/bash -e
TMPDIR="$(mktemp -d)"
sudo apt-get install --mark-auto libuv1-dev libssl-dev libhwloc-dev cmake git
pushd "${TMPDIR}"
git clone https://github.com/xmrig/xmrig.git
cd xmrig
sed -i 's/kDefaultDonateLevel = 1;/kDefaultDonateLevel = 0;/g' ./src/donate.h
sed -i 's/kMinimumDonateLevel = 1;/kMinimumDonateLevel = 0;/g' ./src/donate.h
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j
popd
cp -v -i "${TMPDIR}/xmrig/build/xmrig" .
echo "rm -rvf ${TMPDIR}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment