Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Title: fluxday-install.sh
- # Author: Seth Wahle
- # Contact: Seth [at] cyberdonix.com Twitter: @SethWahle
- # comments:
- #Tested and Confirmed working on Ubuntu 14.04 on a vultr.com instance
- #installs the fluxday project manager from fluxday.io
- #this is a quick development intstall not secure or suited for production
- CONFIG_FILE="/root/fluxday/config/database.yml"
- TARGET_KEY="password"
- echo '----------install dependencies----------'
- sudo apt-get update
- sudo apt-get install -y git build-essential cvs subversion git-core mercurial libmysqlclient-dev mysql-server screen
- echo -n "Enter the MySQL database password and press [ENTER]: "
- read REPLACEMENT_VALUE
- echo '----------Install RVM----------'
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -L get.rvm.io | bash -s stable
- source /etc/profile.d/rvm.sh
- rvm install 2.1.0
- rvm use 2.1.0
- rvm --default use 2.1.0
- rvm reload
- echo '----------Install wkhtmltopdf----------'
- wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
- tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
- mv wkhtmltox/ /lib
- rm wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
- echo '----------Install ImageMagick----------'
- sudo apt-get update
- sudo apt-get -y install imagemagick
- echo '----------download Fluxday----------'
- git clone https://github.com/foradian/fluxday.git
- cd fluxday
- echo '----------Install Bundler----------'
- gem install bcrypt -v '3.1.11'
- gem install mysql2 -v '0.3.21'
- gem install bundler
- #should be run as a non privledged user! create a user first for secure install
- bundle install
- #Configure settings
- cp config/app_config.yml.example config/app_config.yml
- #modify database.yml
- tap=" "
- sed -i "s/\($TARGET_KEY *:*\).*/\1$tap$REPLACEMENT_VALUE/" $CONFIG_FILE
- #build database
- rake db:create
- rake db:migrate
- rake db:seed
- #run fluxday
- rails server
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement