Advertisement
existence_dev92

Untitled

Jan 29th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # go to root
  4. cd
  5.  
  6. # server update & requesting apps install
  7. apt-get -y install git build-essential cmake libuv1-dev libmicrohttpd-dev software-properties-common;
  8.  
  9. # adding gcc repository
  10. add-apt-repository -y ppa:jonathonf/gcc-7.1;
  11.  
  12. # reupdate source
  13. apt-get -y update;
  14.  
  15. # atcivate hugepages
  16. echo 10000 > /proc/sys/vm/nr_hugepages
  17.  
  18. # creating swap files
  19. fallocate -l 4G /swapfile
  20. chmod 600 /swapfile
  21. mkswap /swapfile
  22. swapon /swapfile
  23. echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
  24. echo vm.swappiness=10 > /etc/sysctl.conf
  25. sysctl -p
  26.  
  27. # installing gcc
  28. apt-get -y install gcc-7 g++-7;
  29.  
  30. # cloning xmrig package
  31. git clone https://github.com/xmrig/xmrig.git
  32.  
  33. #entering xmrig directory
  34. cd xmrig
  35.  
  36. # creating build directory
  37. mkdir build
  38.  
  39. # entering build directory
  40. cd build
  41.  
  42. # running cmake & gcc
  43. cmake .. -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
  44.  
  45. # making program
  46. make
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement