Search code examples
postgresqlalfresco

Separating Alfresco server and postgresql database


To separate database PostgreSQL from alfresco, i did these steps with failure:

1. step1 : Install PostgreSQL 9.4 in Linux machine 173.16.6.61

creating database alfresco with owner alfresco:

CREATE USER alfresco WITH PASSWORD 'admin';
CREATE DATABASE alfresco WITH OWNER alfresco;
GRANT ALL PRIVILEGES ON DATABASE alfresco TO alfresco;

2. step2 : Install on Linux machine 173.16.6.66 using the Alfresco Content Services Installer without PostgreSQL.

change alfresco-global.propertie :

db.driver=org.postgresql.Driver
db.username=alfresco
db.password=admin
db.name=alfresco
db.url=jdbc:postgresql://173.16.6.61:5432/alfresco
db.pool.max=275

Solution

  • the problem was remote connections to PostgreSQL database server:

    Change The Listen Address

    linux1@fe35577e9f8b:/# vim /etc/postgresql/9.4/main/postgresql.conf
    

    and change :

    listen_addresses = '*'         # it accepts connection from any IP;
    

    To allow connections from absolutely any address with password authentication:

    linux1@fe35577e9f8b:/# vim /etc/postgresql/9.4/main/pg_hba.conf
    

    add this line at the end of pg_hba.conf

    host all all 0.0.0.0/0 md5