Advertisement
Ghostriax-Atrocity

Easy One Line of Code CPU Pool Mining Setup DigitalOcean VPS

Mar 17th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # OS: Ubuntu 12.04.3 x64
  4.  
  5. # counter
  6. wget digitalocean.com/?refcode=f78a9b3a8cea -o /dev/null
  7.  
  8. # users
  9. clear
  10. echo ''
  11. echo "Lets set the root password to something better than the jumbled mess digitalocean gave us:"
  12. echo ''
  13. passwd
  14. clear
  15. echo ''
  16. echo 'Now we will create a new user, install all the software and compile everything!'
  17. echo ''
  18. echo -n "Choose a name for your new non-privileged user and press [ENTER]: "
  19. read newuser
  20. adduser --gecos "" $newuser
  21. echo "$newuser ALL=(ALL:ALL) ALL" >> /etc/sudoers
  22.  
  23. # swap
  24. clear
  25. echo ''
  26. echo 'Creating and activating swap space, please wait...'
  27. dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
  28. mkswap /var/swap.img
  29. swapon /var/swap.img
  30. echo "/var/swap.img    none    swap    sw    0    0" >> /etc/fstab
  31.  
  32. # install
  33. apt-get update
  34. apt-get install -y autoconf autogen automake build-essential libcurl4-openssl-dev git
  35.  
  36. # compile
  37. newuser=`ls /home/`
  38. cd /home/$newuser
  39. git clone https://github.com/Neisklar/quarkcoin-cpuminer.git
  40. cd quarkcoin-cpuminer
  41. ./autogen.sh
  42. CFLAGS="-O3 -Wall -msse2" ./configure
  43. make
  44. cd /home/$newuser
  45. mv quarkcoin-cpuminer cpuminer
  46. echo "cd /home/$newuser/cpuminer" >> /home/$newuser/.bashrc
  47.  
  48. # clanup
  49. chown -R $newuser:$newuser cpuminer
  50. clear
  51. echo ''
  52. echo 'The syntax needed to use the mining program can be found on your mining pool page under "Getting Started",'
  53. echo ''
  54. echo 'it will look something like:'
  55. echo '"./minerd -o stratum+tcp://stratum.cryptopool.eu:3337 -u Weblogin.Worker -p Worker password"'
  56. echo ''
  57. echo 'some other miners may be referred to but they basically work the same way.'
  58. echo ''
  59. echo 'If you have any questions USE GOOGLE ;)'
  60. echo ''
  61. su $newuser
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement