XMG VPS mining guide


SUBMITTED BY: Guest

DATE: Dec. 8, 2014, 10:56 p.m.

FORMAT: Text only

SIZE: 4.2 kB

HITS: 832

  1. Register your VPS through the following referral link to support this project:
  2. Digitalocean: https://www.digitalocean.com/?refcode=42a47829b9e0
  3. Through the referral link, Digitalocean gives free credit which allows free VPS service.
  4. This guild covers VPS setting up, compiling cpuminer and running pool or solo mining.
  5. 1) Set up a VPS server.
  6. 2) Get the login information from the email received (IP and password), typically
  7. Code:
  8. ssh root@IP
  9. This is a command to ssh login the VPS. You'lll need to figure out ssh, for example, http://www.putty.org/ for windows.
  10. 3) Once login, copy and paste the following commands (you can choose different username than magi)
  11. Code:
  12. adduser magi
  13. follow instructions to set up a user (only need to create password)
  14. Code:
  15. /usr/sbin/visudo
  16. edit this section (add line"magi ..."):
  17. Quote
  18. ## User privilege specification
  19. root ALL=(ALL:ALL) ALL
  20. magi ALL=(ALL:ALL) ALL
  21. 4) Exit and ssh again with (i.e., regular user login rather prior root user)
  22. Code:
  23. ssh magi@IP
  24. 5) Upgrade and install packages:
  25. Code:
  26. sudo apt-get update
  27. sudo apt-get upgrade
  28. sudo apt-get install git screen automake build-essential libboost-all-dev libdb5.1-dev libdb5.1++-dev libminiupnpc-dev libcurl4-openssl-dev libgmp-dev
  29. (input your password if asking)
  30. 6) This is a need if you choose 512 M memory during VPS creation
  31. Code:
  32. sudo dd if=/dev/zero of=/swapfile bs=64M count=16
  33. sudo mkswap /swapfile
  34. sudo swapon /swapfile
  35. Turn on swap permanently by adding it to the fstab file:
  36. Code:
  37. sudo nano /etc/fstab
  38. /swapfile none swap sw 0 0
  39. DON'T do the following steps unless you know what they mean:
  40. Code:
  41. sudo swapon -s
  42. sudo swapoff /swapfile
  43. sudo rm /swapfile
  44. 7) Compile cpuminer (copy and past following command)
  45. Code:
  46. cd
  47. git clone https://github.com/noncepool/m7magi-cpuminer-v2
  48. cd m7magi-cpuminer-v2
  49. ./autogen.sh
  50. CFLAGS="-O3" ./configure
  51. make
  52. sudo cp minerd /usr/local/bin
  53. (notice any errors, let me know if you stuck somewhere)
  54. 8-) Pool mining
  55. We need put the miner a screen session so it will run even when we logout VPS:
  56. Code:
  57. screen -S magi
  58. To use Nonce-pool:
  59. Code:
  60. minerd -o stratum+tcp://mine2.magi.nonce-pool.com:4090 -u <username> -p <password>
  61. To use Suprnova pool:
  62. Code:
  63. minerd -o stratum+tcp://xmg.suprnova.cc:7128 -u <username> -p <password>
  64. <username> and <password> are the worker and password you setup in the pool (check the pool website for info; ask me if you don't know how to set it up)
  65. Press “CTRL+a” and then press “D” to detach from the screen session (get back to prior command line). Under regular command line you can check if the screen section is alive:
  66. Code:
  67. screen -ls
  68. If you remember (i.e., magi), simply issue
  69. Code:
  70. screen -r magi
  71. to back to the mining screen. You logout/login to check if the mining is still going on.
  72. Quote
  73. Press “CTRL+A+D”;
  74. Code:
  75. exit
  76. ssh magi@IP
  77. screen -r magi
  78. Basically you're done pool mining!
  79. If you interested to solo mining, please continue reading.
  80. 9) Compile and run Magi wallet
  81. Code:
  82. cd
  83. git clone https://github.com/magi-project/magi
  84. cd magi/src
  85. make -f makefile.unix
  86. Create a conf file which should be in the folder: ~/.magi (magi is the user we created)
  87. (magi.conf is not necessary, unless you will sole mine; use more complicated pass as you like)
  88. Code:
  89. cd ~/.magi
  90. emacs magi.conf
  91. emacs is text edit tool, use any you like. save the following content:
  92. Quote
  93. daemon=1
  94. server=1
  95. rpcport=8232
  96. rpcallowip=127.0.0.1
  97. rpcuser=rpcuser
  98. rpcpassword=rpcpass
  99. Code:
  100. cd ~/magi/src
  101. ./magid &
  102. The last command runs the daemon.
  103. 10) Solo mining
  104. Code:
  105. ./minerd --url http://127.0.0.1:8232 --user rpcuser --pass rpcpass --threads <number of threads>
  106. 8232 is rpcport, rpcuser and rpcpass are user and password you set in magi.conf
  107. set <number of threads> to a number, matching with the threads of your needs.

comments powered by Disqus