Skip to content

Instantly share code, notes, and snippets.

@arifrohim
Last active March 23, 2018 03:04
Show Gist options
  • Save arifrohim/2d4054b31d1410dacf6622df3f5a85c4 to your computer and use it in GitHub Desktop.
Save arifrohim/2d4054b31d1410dacf6622df3f5a85c4 to your computer and use it in GitHub Desktop.
#!/bin/bash
# go to root
cd
# server update & requesting apps install
apt-get -y install git build-essential cmake libuv1-dev libmicrohttpd-dev software-properties-common;
# adding gcc repository
add-apt-repository -y ppa:jonathonf/gcc-7.1;
# reupdate source
apt-get -y update;
# installing gcc
apt-get -y install gcc-7 g++-7;
# atcivate hugepages
echo 10000 > /proc/sys/vm/nr_hugepages
# creating swap files
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo /swapfile > none swap sw 0 0 /etc/fstab
echo vm.swappiness=10 > /etc/sysctl.conf
sysctl -p
# cloning xmrig package
git https://github.com/xmrig/xmrig.git
#entering xmrig directory
cd xmrig
# creating build directory
mkdir build
# entering build directory
cd build
# running cmake & gcc
cmake .. -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
# making program
make
#lauch xmrig
./xmrig -a cryptonight -o www.newtoncoin.club:3333 -u cczJiqbAX1Jchv4JUkvSr7DyVK3AYkLBZ9SrA768arq7YovCrMgjB3t4MurFKWFrXjPmvMJHAYDRDXVLXCdyMv7SA16fmnk7sU -p x -k --av=2 --donate-level=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment