Skip to content

Setup Streama on Ubuntu 14.04

Antonia Hulha edited this page Aug 2, 2015 · 11 revisions

Update Server

apt-get update
apt-get upgrade
reboot

reconnect afterward

Setup Tomcat and MySQL

apt-get install tomcat7
apt-get install mysql-server
mysql> CREATE DATABASE streama;

By default the application assumes a db-login of username "root", no password. If you wish to change this, edit the settings in the production-section of grails-app/conf/DataSource.groovy

Install Mail Server (optional)

By default the application assumes the default mail server configured at localhost on port 25. You install simply by using

apt-get install sendmail

In order to get emails to work with something else, look into Grails mail plugin.

Create Upload Directory

it is recommended that you choose an upload-directory outside of the application, so that no one can access without permission. Let's assume you choose to place it in root under /data/streama

mkdir /data
mkdir /data/streama
chown tomcat7:tomcat7 /data/streama

Get the Streama ROOT.war

This can be done either on your local machine or on the remote server

cd /wherever/you/want/to/put/streama
git clone git@github.com:dularion/streama.git
cd streama
./grailsw war ROOT.war -Dgrails.env=production

Deploy to Tomcat

on your remote server, stop tomcat7 & remove old tomcat7 ROOT

service tomcat7 stop
rm -R /var/lib/tomcat7/webapps/ROOT
ROOT.war is on local machine

If you built the ROOT.war on your remote server, run

cp ROOT.war /var/lib/tomcat7/webapps
ROOT.war is on remote machine

If you built the ROOT.war on your local machine, run

rsync -avzhP ROOT.war username@your-remote-server:/var/lib/tomcat7/webapps/

Start Application

service tomcat7 start
tail -f /var/log/tomcat7/catalina.out -n99

after successful deployment, the last line should read INFORMATION: Server startup in X ms

Navigate to Application

If everything worked out all right, you should now be able to access the application on http://your-remote-server:8080

Extras