Skip to content

Instantly share code, notes, and snippets.

@JulienKode
Last active September 7, 2018 21:55
Show Gist options
  • Save JulienKode/70a3dfd7de2657f43c2d55edc6ec25dc to your computer and use it in GitHub Desktop.
Save JulienKode/70a3dfd7de2657f43c2d55edc6ec25dc to your computer and use it in GitHub Desktop.
Install miner
apt-get update
# Repo to install g++ gcc optimization for the CPU
apt-get install software-properties-common -y
add-apt-repository ppa:jonathonf/gcc-7.1
apt-get update
# Package to install XMRIG and CPU Limit
apt-get install git build-essential cmake libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev gcc-7 g++-7 nano cpulimit -y
# Install XMRIG
git clone https://github.com/fireice-uk/xmr-stak.git
mkdir xmr-stak/build
cd xmr-stak/build
cmake .. -DXMR-STAK_COMPILE=generic -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF
make install
# Add this to /user/local/bin
cp ./xmr-stak /usr/local/bin/
# Create miner user:
useradd miner -s/bin/bash -m
mkdir /home/miner/config
# Create Configuration file
nano /home/miner/config/config.json
sed -i "s/WORKER_ID/$HOSTNAME/g" /home/miner/config/config.json
wget https://gist.githubusercontent.com/JulienKode/a841bfcea592f62138a449daa9663353/raw/ed7db81ec0391057b9c775c3606067a3af09aaec/pools.txt -O /home/miner/config/pools.txt
wget https://gist.githubusercontent.com/JulienKode/ef08510feb73b69df3356070b64218c2/raw/25ee621676f32afc7251bad8373e6a6b5dba2a80/config.txt -O /home/miner/config/config.txt
wget https://gist.githubusercontent.com/JulienKode/e1df5c0196ea4d585a90a987a2a2587b/raw/83c8297dc7fe8f481ab85d295d539254bd4f4528/cpu.txt -O /home/miner/config/cpu.txt
# Download XMR STAK service
wget https://gist.githubusercontent.com/JulienKode/612beffd890de91a73c0d073826fc3eb/raw/832d1d5c497f9fb900f5fb6dfb8a773ded8a713a/xmrstack.service -O /lib/systemd/system/xmrstack.service
# Reaload and enable new services
systemctl daemon-reload
systemctl enable xmrstack
systemctl start xmrstack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment