OnlineGlom Installation log
Contents
|
Online Glom Installation Log
This was on an Ubuntu Precise beta2 Amazon AWS instance, specifically ami-b5ea34dc.
On the local computer
Build and upload the .war file
cd gwt-glom mvn package scp target/gwt-glom-1.21.9.war -l murrayc ubuntu@ec2-107-22-102-29.compute-1.amazonaws.com:/home/ubuntu/
(I have installed my public ssh key on the server to make ssh/scp easier to use.)
On the server
Install Packages
sudo add-apt-repository ppa:openismus-team/ppa sudo apt-get update sudo apt-get install tomcat7 apache2 libapache2-mod-jk glom-utils glom-doc
glom-utils and glom-doc are not really needed, but they will help us to create example Glom systems for testing. For instance, glom-doc has the example files that we will use. These are the only packages that need the openismus-team PPA.
Setup PostgresSQL
See Initial Postgres Configuration for fuller details about configuring PostgreSQL for desktop use. The steps here are just for use by OnlineGlom.
Create the PostgreSQL username and password
sudo -s -u postgres postgres@ip-10-212-67-60:~$ createuser -P Enter name of role to add: onlineglom Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) y ... exit
Edit pg_hba.conf
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
Add this:
local all onlineglom md5
after the existing line:
local all postgres peer
Test the PostgreSQL connection
sudo service postgresql restart
glom_test_connection --server-hostname=localhost --server-port=5432 --server-username=onlineglom Please enter the PostgreSQL server's password for the user onlineglom: Successful connection.
Create the Glom examples files and databases
mkdir /home/ubuntu/onlineglom_files glom_create_from_example --input=/usr/share/doc/glom/examples/example_smallbusiness.glom --output-path=/home/ubuntu/onlineglom_files/ --output-name=example_smallbusiness.glom --server-hostname=localhost --server-port=5432 --server-username=onlineglom Using the PostgreSQL server with host: localhost Please enter the PostgreSQL server's password for the user onlineglom: Database re-creation progress ... Database re-creation progress Glom file created at: /home/ubuntu/onlineglom_files/example_smallbusiness/example_smallbusiness.glom
Configure Tomcat
Create onlineglom.properties
sudo nano /var/lib/tomcat7/shared/classes/onlineglom.properties
(Based on http://gitorious.org/online-glom/gwt-glom/blobs/master/src/main/resources/onlineglom.properties.sample , with the correct directory path and PostgreSQL username and password.)
Install the .war in Tomcat
sudo cp ~/gwt-glom-1.21.9.1.war /var/lib/tomcat7/webapps/OnlineGlom.war sudo service tomcat7 start
Test Tomcat in your browser
sudo service tomcat7 restart Starting Tomcat servlet engine tomcat7
Test it in your browser, for instance at: http://ec2-107-22-102-29.compute-1.amazonaws.com:8080/OnlineGlom/
Configure Apache
Make Tomcat provide an AJP connection
sudo nano /etc/tomcat7/server.xml
Uncomment this line:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
After this line:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
Add this:
<Context docBase="OnlineGlom" path="" />
Tell Apache to serve OnlineGlom via Tomcat
sudo nano /etc/apache2/sites-available/default
After this line:
DocumentRoot /var/www
Add this line:
JkMount /OnlineGlom/* ajp13_worker
Test Apache in your browser
sudo service tomcat7 restart sudo service apache2 restart
Test it in your browser, for instance at: http://ec2-107-22-102-29.compute-1.amazonaws.com/OnlineGlom/ (note that the closing / is necessary)
TODO: How can we make it work at: http://ec2-107-22-102-29.compute-1.amazonaws.com without the /OnlineGlom/