Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.96 KB | None | 0 0
  1. #I want to give credit to paranoidtruth for most of this manual.
  2. #I borrowed a lot of his work from another coin.
  3. #GoaCoin GUIDE for windows-linux setup
  4.  
  5. #you need a linux vps to get a public IP, etc. If you don't know what that is, do something else.
  6. #I am NOT a linux expert, if you are and see anything incorrect, unnecessary, or should be added for security, etc, please let me know and I'll update!
  7. #focusing on the linux side, the windows *should* be pretty easy and simpler than it sounds
  8. #But I will also cover the windows side below.
  9.  
  10. #I personally use a fairly small linux instance, 1024memory, ubuntu, 16.04
  11. #there are tons of vps services like: ovh, vpsdime, vultr, digitalocean, etc, etc.
  12. #get the ip & root login from your vps you setup
  13. #SSH into the vps (most windows users will use putty. If you're not familiar with putty, watch a quick youtube vid)
  14. #If you're on a mac (when the mac wallet is available, you have a built in SSH terminal instead of putty)
  15. #setup putty to connect to the IP and save that connection, ssh root@your_ip
  16. #after connecting should see something like: root@whatever_your_server_name_is
  17. #copy all instructions one line at a time:
  18.  
  19. #if we have a cheap vps instance with low memory, a swap file for more memory is a good idea:
  20. free -h
  21. #that will just show what you currenty have
  22.  
  23. #now setup the swap:
  24. sudo fallocate -l 4G /swapfile
  25. ls -lh /swapfile
  26. sudo chmod 600 /swapfile
  27. sudo mkswap /swapfile
  28. sudo swapon /swapfile
  29. #Make Changes Permanent
  30. echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
  31. sudo bash -c "echo 'vm.swappiness = 10' >> /etc/sysctl.conf"
  32.  
  33. #Confirm Changes, you should now see a second line different that before, showing the 4G swap has been setup
  34. free -h
  35.  
  36. #I also prefer to not install as root. Security & makes it easier if later you want to run more than one coin on the server,
  37. #you will have a diff home dir for each coin
  38. #so let's create a user called GoaCoin1
  39. #it's going to ask you questions like room number, you can just hit enter for all those, all you really need to fill in
  40. #is the new user password, do not lose this password either, you need both the root & GoaCoin1 password from now on
  41.  
  42. #You can try to run this command but sometimes you will get an error message depending on the Linux install you have
  43. adduser GoaCoin1
  44.  
  45. # This is the error message from running "adduser GoaCoin1" on some Linux configurations
  46. # "adduser: Please enter a username matching the regular expression configured
  47. # via the NAME_REGEX[_SYSTEM] configuration variable. Use the '--force-badname'
  48. # option to relax this check or reconfigure NAME_REGEX."
  49. # Since we don't want to reconfigure the NAME_REGEX file,
  50. # let's just relax the constraint for the new username instead.
  51. sudo adduser --force-badname GoaCoin1
  52.  
  53. #now give this user sudo access (more power!)
  54. usermod -aG sudo GoaCoin1
  55.  
  56. #alright, if this is your first coin on the server, there are upgrades & dependencies to install:
  57. sudo apt-get update -y
  58. sudo apt-get upgrade -y
  59. sudo apt-get dist-upgrade -y
  60. sudo apt-get install nano htop git vim -y
  61. sudo apt-get install build-essential libtool autotools-dev automake -y
  62. sudo apt-get install pkg-config libssl-dev libevent-dev bsdmainutils software-properties-common -y
  63. sudo apt-get install libboost-all-dev -y
  64. sudo apt-get install libzmq3-dev libminiupnpc-dev libssl-dev libevent-dev -y
  65. sudo add-apt-repository ppa:bitcoin/bitcoin -y
  66. sudo apt-get install libdb4.8-dev libdb4.8++-dev -y
  67. sudo apt-get install fail2ban -y
  68. sudo apt-get install -y ufw
  69. sudo apt-get update -y
  70.  
  71. #alright, now let's install GoaCoin
  72. #change over to our GoaCoin1 user to install in that user home dir
  73. #it may ask for your GoaCoin1 password
  74. su - GoaCoin1
  75.  
  76. #verify we are in the GoaCoin1 home dir:
  77. pwd
  78. #that will show your curr directory, which should be /home/GoaCoin1
  79.  
  80. #Now let's install GoaCoin into your new user's home folder
  81. git clone https://github.com/goacoincore/goacoin.git
  82.  
  83. #Check to see if it created a goacoin folder
  84. ls
  85. #You should see the "goacoin" folder in a different color
  86.  
  87. #build it, some of these steps will take a while:
  88. cd goacoin
  89. chmod 755 autogen.sh
  90. ./autogen.sh
  91. ./configure
  92. chmod 755 share/genbuild.sh
  93. make
  94.  
  95.  
  96. #built, lets move back to your home dir:
  97. cd ~/
  98.  
  99. #now, the ls command shows your files/directories
  100. ls
  101. #the ls -alrt will show all your hidden files/directories as well:
  102. ls -alrt
  103.  
  104. #you should see a lot more there, like the .SagaCoin directory that you didn't see before, so you have a SagaCoin & a .SagaCoin directory
  105. #copy your sagacoind executable file to /usr/local/bin so that it's globally executable from anywhere
  106. sudo chmod +x goacoin/src/goacoind
  107. sudo cp goacoin/src/goacoind /usr/local/bin/
  108.  
  109. #alright, let's see if we can start it:
  110. goacoind -daemon
  111. #now it should be running. try some commands:
  112.  
  113. # change directory to the goacoin/src/ folder
  114. cd goacoin/src/
  115.  
  116. # List all commands for ./goacoin-cli
  117. ./goacoin-cli help
  118.  
  119. # Get mining info
  120. ./goacoin-cli getmininginfo
  121.  
  122. #you should see some info, one important one is the blocks.
  123. #do that command again:
  124. ./goacoin-cli getmininginfo
  125. #you should see a higher block number than before. If it is, it's syncing to the block chain, doing good!
  126. #let it run for a while. we want it to fully sync, so keep doing that command until it reaches the curr block
  127. #what's the current block? you can see the block # here: http://goacoin.be/
  128.  
  129. #ok, all sync'd? let's stop it because we are going to edit the conf file.
  130. #If you edit the conf file, in particular the user/pass while it's running, you'll get stuck, so always stop it first:
  131. ./goacoin-cli stop
  132.  
  133. #probably easiest editor to use is nano, at the bottom you'll see commands,
  134. #like CTRL-X will exit (it says where it's going to save, hit [ENTER])
  135. nano .goacoincore/goacoin.conf
  136.  
  137. #remove whatever is there, and copy-paste exactly this into it:
  138.  
  139. rpcuser=goacoin1rpc_or_some_other_random_username_with_only_letters_and_numbers
  140. rpcpassword=asdf1234_or_make_up_some_random_pass_with_letters_and_numbers_you_do_not_need_to_remember_it
  141. rpcport=10024
  142. port=1947
  143. masternode=1
  144. listen=1
  145. staking=0
  146. discover=1
  147. maxconnections=256
  148. externalip=YOUR_VPS_IP:1947
  149. masternodeprivkey=xxx
  150. addnode=54.37.74.53
  151. addnode=207.148.66.170
  152. addnode=194.67.220.255
  153. addnode=45.76.190.44
  154. addnode=80.208.227.101
  155. addnode=185.92.223.139
  156.  
  157. #NOW replace the rpcuser, rpcpassword, and the externalip IP address.
  158. #The IP is your vps IP:1947, so it should look like xx.xx.xx.xx:1947
  159. #the masternodeprivkey will be from your windows setup. If you already did that, you already have it.
  160. #But you probably don't if you haven't done the windows side yet, so just leave it as xxx for now
  161.  
  162. #to save
  163. CTRL X
  164.  
  165. #agree to over write the file press Y
  166. Y
  167.  
  168. #to tell Linux to make the change to the file and exit nano
  169. ENTER
  170.  
  171. # allow port 1947 through the firewall
  172. sudo ufw allow 1947/tcp
  173.  
  174. #linux side is almost done. (we still need the masternodeprivkey from your Windows PC wallet)
  175. #######################################################################################################
  176.  
  177. #######################################################################################################
  178. # WINDOWS:
  179. #side note, you actually need a little over 1000 because there's a trans fee.
  180. #If you literally have only 1000, go buy one more coin.
  181.  
  182. 1) Download and install GAO on your home PC computer, links:
  183.  
  184. https://github.com/goacoincore/goacoin/releases/download/v0.12.1.6/goacoin-qt-0.12.1.6-win64.zip
  185. https://github.com/goacoincore/goacoin/releases/download/v0.12.1.6/goacoin-qt-0.12.1.6-win32.zip
  186. Choose win64 OR win32 based on the operating system (I always get the 32-bit because it's usually less buggy)
  187.  
  188. 2) Wait until the wallet synchronizes and all the blocks are updated.
  189.  
  190. 2a) Encrypt your wallet (Top left menu: Settings --> Encrypt Wallet...) Set a strong password and DON'T LOSE IT!
  191. 2b) BACKUP YOUR WALLET (Top left menu: File --> Backup Wallet...) Save the file somewhere safe.
  192. 2c) Did I mention that you need to backup your wallet? You need to backup your wallet...!
  193. 2d) HEY YOU! BACKUP YOUR WALLET!!!
  194.  
  195. 3) Go to the menu 'Tools' en select option 'Debug console'.
  196.  
  197. 4) In the console type getnewaddress <your MN name>. Your MN alias name can be a name choosen by you.
  198. Let's choose as example "mymasternode" for this guide.
  199.  
  200. 5) In the Console enter the command getaccountaddress mymasternode. You'll get the address.
  201.  
  202. 6) Send 1000 GOA coins to address generated in step 4. With the 1 extra you're sure you don't have to bother about the fee.
  203.  
  204. Goto menu 'Send' --> paste the address in 'Pay To' input box, enter 1000 en press button 'Send'.
  205. The transaction fee should be automatically added to the transaction from the remaining balance.
  206.  
  207. 7) Wait for the 10 confirmations to complete, check it in the 'Transactions tab', this can take 30-60 minutes.
  208.  
  209. 7a) I hope you remembered to backup your wallet and your password... Just say'in...
  210.  
  211. 8 Go to the menu 'Tools' --> 'Debug console'.
  212.  
  213. 9) Type: masternode genkey
  214.  
  215. 10) Type: masternode outputs
  216.  
  217. 11) Copy the answers from step 9 and 10 to a empty notepad, for later usage.
  218.  
  219. 15) Now go to 'Tools' --> 'Open Masternode configuration File' to edit this configuration. Delete the content of the file.
  220. 16) Add your own masternode configuration settings copy the following text, the answers did you save in step 4 and 11:
  221.  
  222. <your MN alias name> <your ip address>:1947 <answer of step 9> <first part of answer in step 10> <2nd part of answer in step 10>
  223.  
  224. It should look something like this:
  225. mymasternode 88.77.66.55:1947 765765634GHGjhgfsda782332bhds98dasbgh398hds9 34783478347hHJKLh438743hhbuon4123uusdaj23JJK8327H 1
  226.  
  227. In the above line, last number can be 0 or 1 depending on the answer of step 10, in this guide we got 1 at the end of outputs
  228.  
  229. 17) Save your masternode configuration file and close notepad.
  230.  
  231. 18) Close your GoaCoin Wallet program on Windows
  232.  
  233. ###############################################################################################
  234.  
  235. ###############################################################################################
  236. LINUX VPS:
  237.  
  238. #go back to your VPS Linux server (putty)
  239.  
  240. #switch to the GoaCoin1 user
  241. su - GoaCoin1
  242.  
  243. #update the vps config:
  244. nano .SagaCoin/sagacoin.conf
  245.  
  246. #update your masternodeprivkey from step 9) and then exit/save
  247. CTRL-X then Y then [ENTER]
  248.  
  249. #start it:
  250. goacoind
  251.  
  252. # Close the SSH window to end the session
  253.  
  254. ###############################################################################################
  255. WINDOWS
  256. #go back to windows, let's kick it off:
  257.  
  258. #Open your GoaCoin exe
  259. #go to the "My Masternodes" tab
  260. #hit the start or start all button.
  261. #with any luck it will show successfully started. If it does not:
  262. #"could not allocate vin" means your wallet isn't unlocked, OR it didn't recognize your 1000 coins for the MN, maybe wrong amount.
  263. #check the block explorer using your MN addr (remember, it's in your receive tab so you can copy it from there)
  264. # http://goacoin.be/
  265. #does it have exactly one transaction of 1000? It's very picky about that rule.
  266.  
  267. #ok, hopefully all of that is sorted out
  268. #in windows, go to the masternodes tab and click on the masternodes network sub-tab
  269. #you should be able to find yours. The active column will take a while to update, don't worry
  270.  
  271. ##############################################################################################
  272. LINUX
  273. #ok, let's go back to your vps (putty)
  274.  
  275. #now, let's see if we can see our ip in the list, swap in YOUR ip instead of xx.xx.xx.xx:
  276.  
  277. # change directory to the goacoin/src/ folder
  278. cd goacoin/src/
  279.  
  280. # List all commands for ./goacoin-cli
  281. ./goacoin-cli help
  282.  
  283. # Get mining info
  284. ./goacoin-cli getmininginfo
  285.  
  286. # List Masternodes
  287. ./goacoin-cli masternode list | grep xx.xx.xx.xx
  288.  
  289. #with any luck you will see something like: xx.xx.xx.xx:1947 : 1,
  290. #1 is good, that means your ip is active/enabled in the saga masternode list
  291.  
  292. #FYI: some commands you might use on occasion:
  293. goacoind #starts goacoin
  294. ./goacoin-cli masternode list #shows all nodes
  295. ./goacoin-cli stop #stops goacoin
  296. ./goacoin-cli getmininginfo #show blocks, etc.
  297. ./goacoin-cli help #shows every possible command
  298.  
  299. #add a couple basic sec items, firewall & fail2ban
  300. sudo ufw default allow outgoing
  301. sudo ufw default deny incoming
  302. sudo ufw allow ssh/tcp
  303. sudo limit ssh/tcp
  304. sudo ufw allow 1947/tcp
  305. sudo ufw logging on
  306. sudo ufw enable
  307. sudo ufw status
  308.  
  309. #note, if you run other coins on diff ports, run the firewall allow commands to open/allow those ports as well
  310. #like we did above to allow 1947
  311.  
  312. #fail2ban:
  313. sudo systemctl enable fail2ban
  314. sudo systemctl start fail2ban
  315.  
  316. #wait for rewards. First one might take up to 24 hours.
  317. #I also use the monitoring feature of masternodes.online.
  318. #You can create an acct and find your node by searching by ip:port
  319. #add it to your monitor list, and be sure that it's running.
  320.  
  321. ################################################################################
  322.  
  323. If you haven't done so already, I recommend you go BACKUP YOUR WALLET!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement