Wednesday, June 16, 2010

Preparing Postgres for Liferay

A. Configure Postgres:
Make Postgres listen from REMOTE host: PostgresSQL config

1. Modify /var/lib/pgsql/data/pg_hba.conf 
local    all    all    trust
lost    all    all    0.0.0.0/0    trust

2.Modify /var/lib/pgsql/data/postgresql.conf
listen_address='*'


B. Configure Liferay JDBC:

1. Create portal-ext.properties in webapps/ROOT/WEB-INF/classes

jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
jdbc.default.username=liferay
jdbc.default.password=password

2. Change jdbc.properties in tomcat-6.0.18/webapps/wol-portlet/WEB-INF/jdbc.properties, that will disable HSQL
jira.driverClassName=org.postgresql.Driver
jira.url=jdbc:postgresql://localhost:5432/lportal
jira.username=postgres
jira.password=


C. Configure Liferay webserver port:
Modify tomcat-6.0.18/conf/server.xml, change the port in


D. Remove 7Cog sample portal:
remove sevencogs-hoot in webapps



References:

Reference link: http://www.liferay.com/community/wiki/-/wiki/Main/PostgreSQL%20with%20Glassfish;jsessionid=FC83246907BFF757693820C8890656C5.node-1

Create database user:
psql -U postgres -c "CREATE USER your_login WITH PASSWORD 'your_password' CREATEDB"


Prepare sample database for liferay


Download database script here:
http://www.liferay.com/downloads/liferay-portal/additional-files

psql template1 -U your_login -f create-postgresql.sql

No comments:

Post a Comment