u-boot.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. # Finals Club collaborative real-time editor
  3. # deployment script. (c) 2011 Finals Club Foundation
  4. # This script is licensed under the terms of the GPL
  5. # v3. To view this license, please see the COPYING
  6. # file in the src root.
  7. haproxy=/usr/sbin/haproxy
  8. #get / install dependencies
  9. apt-get update
  10. apt-get install git-core
  11. apt-get install make
  12. apt-get install g++
  13. apt-get install sqlite
  14. apt-get install curl
  15. # get src
  16. git clone git://github.com/finalsclubdev/FinalsClub.git
  17. cd etherpad-lite
  18. git clone git://github.com/chapel/etherpad-lite.git
  19. cd ..
  20. # install node
  21. nodever="v0.4.10"
  22. if test ! -e node-$nodever ; then
  23. curl http://nodejs.org/dist/node-v0.4.10.tar.gz > node-v0.4.10.tar.gz
  24. tar xzvf node-$nodever.tar.gz
  25. cd node-$nodever
  26. ./configure
  27. make
  28. make install
  29. fi
  30. # install npm
  31. if test ! -e npm ; then
  32. git clone http://github.com/isaacs/npm.git
  33. cd npm
  34. sudo make install
  35. cd ..
  36. fi
  37. npm install nodemon -g
  38. npm install forever -g
  39. ## make it easier for root to run node
  40. cd /usr/bin
  41. ln -sf /usr/local/bin/node .
  42. ln -sf /usr/local/bin/forever .
  43. rm /data/db/mongod.lock
  44. /usr/local/bin/mongod -v --rest --replSet finalsclubset &> /var/log/mongod.log &