Indlæg

Viser indlæg fra november, 2012

Distributing Liferay including custom portlets, hook, ext etc

Been working on Liferay (CE 6.1.1) for a couple of months now.
I ended up with a task about creating a script that could automate deployment of Liferay, a database server and all the war archives we created (portlets, ext, hooks, themes etc).

I used PostgreSQL (9.1.6) as the database.

The documentation on this was pretty fragmented so I thought I might as well publish the complete script here:

#!/bin/bash

####################################################
# Install the postgres database                    #
####################################################
tar -zxvf ~/Downloads/postgresql-9.1.6-1-linux-x64-binaries.tar.gz
pgsql/bin/initdb -D pgsql/data
pgsql/bin/pg_ctl start -w -D pgsql/data/ -l postgres.logs
pgsql/bin/createuser --no-createdb --no-createrole --no-superuser schneider
pgsql/bin/createdb lportal -O schneider
####################################################
# Install liferay bundle including tomcat          #
####################################################