diff --git a/Installing-Tracks-2.3.0-on-Ubuntu-14.04-LTS-on-AWS-with-SSL-support.md b/Installing-Tracks-2.3.0-on-Ubuntu-14.04-LTS-on-AWS-with-SSL-support.md new file mode 100644 index 0000000..b129f19 --- /dev/null +++ b/Installing-Tracks-2.3.0-on-Ubuntu-14.04-LTS-on-AWS-with-SSL-support.md @@ -0,0 +1,77 @@ +Installing Tracks on a clean server (Ubuntu 14.04 LTS) running on Amazon Web Services with a self-signed SSL certificate for a secure HTTPS access. + +## Install all required dependencies + +``` +$ sudo apt-get install thin unzip bundler libsqlite3-dev zlib1g-dev libssl-dev +``` + +## Rebuild eventmachine with SSL support + +``` +$ sudo gem uninstall eventmachine +$ sudo gem install eventmachine +``` + +## Download tracks (2.3.0) + +``` +$ mkdir tracks +$ cd tracks +$ wget https://github.com/TracksApp/tracks/archive/v2.3.0.zip +$ unzip v2.3.0.zip +$ cd tracks-2.3.0/ +``` + +## Configuration + +### Disable mysql backend + +* edit Gemfile, comment line: +``` +#gem "mysql2", "~> 0.3.16" +``` + +### Update configuration file +``` +$ cp config/database.yml.tmpl config/database.yml +$ nano config/database.yml +``` +Uncomment the section for sqlite production, delete the other configuraion for production; don't delete the rest + +### Update site file +``` +$ cp config/site.yml.tmpl config/site.yml +$ nano config/site.yml +``` +* change "change-me" in salt and "secret_token" to some random value + +* change config.serve_static_assets to true in config/environments/production.rb in order for the images, stylesheets, and javascript files to be served correctly. +$ nano config/environments/production.rb + +## Bundle install (in tracks-2.3.0 folder) + +``` +$ bundle install +``` + +## Precompile assets + +``` +$ bundle exec rake assets:precompile RAILS_ENV=production +``` + +## [Optional; if you don't have SSL certificate] + +* generate certificates, e.g. in /home/ubuntu/certificates + +``` +$ openssl req -newkey rsa:2048 -nodes -keyout key.pem -out req.pem +$ openssl x509 -req -days 365 -in req.pem -signkey key.pem -out cert.pem +``` + +## Run tracks with thin + ssl (in tracks-2.3.0 folder) + +``` +$ bundle exec thin start -e production --ssl --ssl-verify --ssl-key-file /home/ubuntu/certificates/key.pem --ssl-cert-file /home/ubuntu/certificates/cert.pem +```