Advertisement
m0gliE

Building Fastcoin on Ubuntu for Amazon EC2

Feb 21st, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.76 KB | None | 0 0
  1. How to install fastcoind on Amazon EC2 Ubuntu 12.x x32/x64
  2.  
  3. ## Make instance
  4.  
  5.     ## launch a t1.micro instance of ubuntu-precise-12.04-amd64-server-20131003    
  6. >Launch Instance
  7.    
  8.     ## create a security group
  9. >Network & Security > Security Groups > Create Security Group
  10.  
  11.     ##open ports in the security group settings
  12. >port 22 (SSH)
  13. >port 9332 fastcoin rpc respectively
  14.  
  15.     ## create a keypair.pem file and save it
  16. >Network & Security > Key Pairs > Create Key Pair
  17.  
  18.     ## set file permissions on pem file
  19. chmod 400 keypair.pem
  20.  
  21.     ## log in using java ssh client or via ssh with key pair
  22. ssh -i keypair.pem ubuntu@serverIPADDRESS
  23.  
  24. ## Make Swap
  25.  
  26. sudo dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
  27. sudo mkswap /swapfile1
  28. sudo chown root:root /swapfile1
  29. sudo chmod 0600 /swapfile1
  30. sudo swapon /swapfile1
  31.  
  32.     ## now edit your fstab
  33. sudo nano /etc/fstab
  34.  
  35.     ## apend the following
  36. /swapfile1 swap swap defaults 0 0
  37.  
  38.     ## check that you have swap with
  39. free -m
  40.  
  41.     ## update
  42. sudo apt-get update
  43.  
  44.     ## install dependencies
  45. sudo apt-get install build-essential libssl-dev libdb4.8-dev libdb4.8++-dev libboost-all-dev libdb++-dev git
  46. sudo apt-get install libminiupnpc-dev
  47.     ## confirm y when prompted
  48.  
  49.     ## clone the lastest fastcoin source from github
  50. git clone https://github.com/fastcoinproject/fastcoin.git -b fastcoin-8.7.2
  51.    
  52.     ## upgrade
  53. sudo apt-get upgrade
  54.  
  55. ## Make Fastcoin
  56.  
  57.     ## change directory to src
  58. cd fastcoin/src
  59.  
  60.     ## create the obj dir
  61. mkdir obj
  62. cd ..  
  63.  
  64.         ## run make with the following arguments
  65. sudo make -j4 -f makefile.unix USE_UPNP=0 USE_IPV6=0
  66.  
  67.         ## copy fastcoind into the usr/bin folder
  68. sudo cp fastcoind /usr/bin/
  69.  
  70.         ## create a ".fastcoin" folder in your home directory
  71. mkdir ~/.fastcoin
  72.  
  73.     ## change directory to ~./fastcoin
  74. cd ~/.fastcoin
  75.  
  76.         ## create fastcoin.conf
  77. sudo nano fastcoin.conf
  78.  
  79. server=1
  80. daemon=1
  81. rpcport=9527
  82. port=9526
  83. rpcallowip=127.0.0.1
  84. rpcallowip=yourIP
  85. rpcallowip=serverIP
  86. rpcconnect=127.0.0.1
  87. rpcconnect=yourIP
  88. rpcuser=yourusername
  89. rpcpassword=yourpassword
  90. addnode=188.126.8.14
  91. addnode=188.143.73.84
  92. addnode=190.191.141.145
  93. addnode=192.0.209.231
  94. addnode=192.241.183.7
  95. addnode=193.238.64.246
  96. addnode=198.84.250.234
  97. addnode=211.203.176.119
  98.  
  99.     ## download bootstrap.dat
  100. wget http://archive.org/download/fastcoin_bootstrap/bootstrap.dat.xz
  101.  
  102.     ## decompress the file
  103. xz -d bootstrap.dat.xz
  104.  
  105.     ## change to /usr/bin
  106. cd /usr/bin
  107.  
  108.     ## launch the fastcoin daemon
  109. ./fastcoind -dbcache=1000
  110.  
  111.         ## now run getinfo
  112. fastcoind getinfo
  113.  
  114.     ## periodicly run getinfo to monitor the "blocks" section
  115.     ## if blocks fail to increase, simply stop the deamon
  116. fastcoind stop
  117.     ## and restart
  118. ./fastcoind &
  119.  
  120.     ## if you download a copy of the blockchain, it is recommended to reindex
  121. ./fastcoind -reindex -dbcache=1000 &
  122.  
  123. ## Setup P2Pool
  124.  
  125.     ## change to your home/user dir
  126. cd /home/username
  127.  
  128.     ## install dependencies
  129. sudo apt-get install python-dev python-zope.interface python-twisted python-twisted-web git screen
  130. sudo apt-get install python-rrdtool python-pygame python-scipy python-imaging
  131.  
  132.     ## clone p2pool
  133. sudo git clone https://github.com/m0gliE/p2pool.git
  134.  
  135.     ## change dir to litecoin_scrypt
  136. cd litecoin_scrypt
  137.  
  138.     ## setup install
  139. sudo python setup.py install
  140.  
  141.     ## change dir back to p2pool
  142. cd ..
  143.     ## move web-static folder to web-static-old
  144. sudo mv web-static web-static-old
  145.  
  146.     ## clone extended frontend
  147. sudo git clone https://github.com/m0gliE/P2PoolExtendedFrontEnd.git web-static
  148.  
  149.     ## run p2pool command line (make your own edits)
  150. screen sudo python run_p2pool.py --net fastcoin --irc-announce --bitcoind-address 192.168.2.107 --bitcoind-rpc-port 9527 --bitcoind-p2p-port 9526 --give-author 0.5 username password
  151.  
  152.     ## exit screen (hold ctrl and hit a then d)
  153. ctrl + A D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement