OnlineGlom Installation log

From Glom
Revision as of 02:47, 20 April 2012 by Murrayc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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- -l murrayc

(I have installed my public ssh key on the server to make ssh/scp easier to use.)

On the server

Install the dependencies

sudo sudo add-apt-repository ppa:openismus-team/ppa
sudo apt-get update
sudo apt-get install apache2 tomcat7 glom-utils glom-doc libjava-glom-java

(glom-doc has the example files that we will use.)

Setup PostgresSQL

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

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

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

sudo nano /var/lib/tomcat7/shared/classes/

(Based on , with the PostgreSQL username and password.)

Change Tomcat's java.library.path

//This doesn't seem to be necessary on Ubuntu Precise:

sudo nano /etc/default/tomcat7

and change this line

JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"

to this:

JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Djava.library.path=/usr/lib/jni:/usr/lib"
Install the java-libglom .jar in Tomcat
sudo cp /usr/share/java/java-libglom-1.21.4.jar /usr/share/tomcat7/lib/
Install the .war in Tomcat
sudo cp ~/gwt-glom- /var/lib/tomcat7/webapps/OnlineGlom.war
$ sudo tomcat7 start

sudo: tomcat7: command not found

Test Tomcat in your browser
$ sudo service tomcat7 restart
* Starting Tomcat servlet engine tomcat7

Test it in your browser, for instance at: