daily pastebin goal
1%
SHARE
TWEET

fluxday-install.sh

osteth Jun 5th, 2016 (edited) 17 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2. # Title: fluxday-install.sh
  3. # Author: Seth Wahle
  4. # Contact: Seth [at] cyberdonix.com  Twitter: @SethWahle
  5. # comments:
  6. #Tested and Confirmed working on Ubuntu 14.04 on a vultr.com instance
  7. #installs the fluxday project manager from fluxday.io
  8. #this is a quick development intstall not secure or suited for production
  9.  
  10. CONFIG_FILE="/root/fluxday/config/database.yml"
  11. TARGET_KEY="password"
  12.  
  13. echo '----------install dependencies----------'
  14. sudo apt-get update
  15. sudo apt-get install -y git build-essential cvs subversion git-core mercurial libmysqlclient-dev mysql-server screen
  16. echo -n "Enter the MySQL database password and press [ENTER]: "
  17. read REPLACEMENT_VALUE
  18.  
  19. echo '----------Install RVM----------'
  20. curl -sSL https://rvm.io/mpapis.asc | gpg --import -
  21. curl -L get.rvm.io | bash -s stable
  22. source /etc/profile.d/rvm.sh
  23. rvm install 2.1.0
  24. rvm use 2.1.0
  25. rvm --default use 2.1.0
  26. rvm reload
  27.  
  28.  
  29. echo '----------Install wkhtmltopdf----------'
  30. wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
  31. tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
  32. mv wkhtmltox/ /lib
  33. rm wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
  34.  
  35. echo '----------Install ImageMagick----------'
  36. sudo apt-get update
  37. sudo apt-get -y install imagemagick
  38.  
  39. echo '----------download Fluxday----------'
  40. git clone https://github.com/foradian/fluxday.git
  41. cd fluxday
  42.  
  43. echo '----------Install Bundler----------'
  44. gem install bcrypt -v '3.1.11'
  45. gem install mysql2 -v '0.3.21'
  46. gem install bundler
  47. #should be run as a non privledged user! create a user first for secure install
  48. bundle install
  49.  
  50. #Configure settings
  51. cp config/app_config.yml.example config/app_config.yml
  52.  
  53.  
  54. #modify database.yml
  55. tap=" "
  56. sed -i "s/\($TARGET_KEY *:*\).*/\1$tap$REPLACEMENT_VALUE/" $CONFIG_FILE
  57.  
  58. #build database
  59. rake db:create
  60. rake db:migrate
  61. rake db:seed
  62.  
  63. #run fluxday
  64.  rails server
RAW Paste Data
Top