Compiere on PostgreSQL Install Script

1 2 > >> (Page 1 of 2)
  • Jonah H. Harris

    Jonah H. Harris - 2005-06-06

    This is the full-blown script for Linux.  Let me know if it works for you.

    Create a user and download the following script into the user's home directory.

    Then, run it as follows:

    chmod 0755

    Here is the info from my system:

    - Shell: BASH
    - Hostname: rhel3
    - Platform: Dual Processor 1.0 GHz (Pentium III)
    - O/S: Red Hat Enterprise Linux (RHEL) Advanced Server  3.0
    - Network: Cable (4MBit)
    - Time to complete: ~20 Minutes

    Web Port: 8080
    SSL Port: 4443
    Database Type: PostgreSQL
    Database Name: cptst01

    - It takes awhile to download, build, and install everything.  Don't cancel in the middle, just
    let it run unless you get an error.  If you get an error, check ~/pg_ent_and_cl_install.log.


    Build Script for PostgreSQL Enterprise 8.0.3 (with Compiere)
    Release 1, Level 10

    Copyright (c) 2004,2005 Jonah H. Harris. All Rights Reserved.

    We must test your X DISPLAY!
    We have launched xclock and are waiting on the return code.
    YOU MUST CLOSE xclock to proceed!
    Your X DISPLAY is good!... proceeding...

    Building PostgreSQL Enterprise Directory Structure...done.
    Downloading Java...done.
    Decompressing Java...done.
    Performing Java Cleanup...done.
    Downloading PostgreSQL JDBC Drivers...done.
    Downloading PostgreSQL...done.
    Downloading PL/Java...done.
    Decompressing PostgreSQL...done.
    Configuring PostgreSQL...done.
    Building PostgreSQL...done.
    Installing PostgreSQL...done.
    Building Environment File...done.
    Building PostgreSQL Contrib Modules...done.
    Building PL/Java...done.
    Fixing PL/Java Library Paths...done.
    Copying PL/Java JARs...done.
    Initializing PostgreSQL...done.
    Add PL/Java Configuration...done.
    Starting PostgreSQL...done.
    Adding PL/pgSQL to PostgreSQL...done.
    Creating Compiere Database User...done.
    Creating Compiere Database...done.
    Installing PL/Java...done.
    Restarting PostgreSQL...done.
    Downloading Compiere...done.
    Decompressing Compiere...done.
    Creating Compiere Schema...done.
    Loading Compiere Seed Data...done.
    Running Compiere Setup (be patient)...done.

    Install Done.

    • David Kerins

      David Kerins - 2005-06-06

      Jonah,  I tried your script on a vanilla (more or less) install of CentOS 3.4.

      The install worked flawlessly.

      I modified the pg_hba.conf for network access to the PostgreSQL database and have successfully launched "webstart" clients on a Mac OSX 10.3.9 machine and a Windows XP Home machine.

      The webstore also works although this Compiere has no GardenWorld so I couldn't try an transactions.

      All in all very nice script and super easy install.  Thanks.

      I look forward to testing this possibly supporting a production version of Compiere on PostgreSQL in the future.

      I read in another post you are working on the latest 2.5.2d code to build it for PostgreSQL.  I look forward to the fruit of your labour.

      Thanks for this.

      • Jonah H. Harris

        Jonah H. Harris - 2005-06-06


        Out of 66 people who have downloaded my script, you are the first to respond... thanks!  Second, I'm glad it worked for you and I'll make sure that you're aware when Victor and I get the newer version ready.

        Thanks again!


    • carlos

      carlos - 2005-06-07

      Hi Jonah! Thank you very much for your work.

      I am using Mandriva 2005 and I just tryed your script.

      Everything goes fine until I received the following error:
      Fixing PL/Java Library Paths...ERROR

      Then I check the log file and this is what I get:

      cd /home/postgres/product/8.0.3/lib && \ rm -f && \ ln -s
      cd /home/postgres/product/8.0.3/lib && \ rm -f && \ ln -s
      make[1]: Leaving directory `/home/postgres/product/src/bld/pljava-1.1.0/build/objs'
      cp: /home/postgres/product/8.0.3/lib/pgxs: The directory do not exist

      Any idea about how to fix this error?

      Best Regards! and once again thank you very much for your support.

      • Jonah H. Harris

        Jonah H. Harris - 2005-06-07

        I found this issue yesterday, but it must have been after you downloaded the script.  Please delete the script you have  and download it again into the user's home directory.  Then, perform the following in the user's home directory.

        rm -rf product

        NOTE: Make sure that you are in the right location before doing this!


    • carlos

      carlos - 2005-06-07

      Second chance!
      It worked perfect! No more error messages. I will start testing

      Once again thank you!

      • Jonah H. Harris

        Jonah H. Harris - 2005-06-08

        Cool... I hope it was a bit easier than having to do it all yourself :).

    • Nino Capodivento

      Great script Joan,
      I used it on Mandrake 10.1 without problems.
      Just in compilation of Postgres I added --without-zlib --without-readline because not found on my system.
      Thank you again for your efforts.


    • stuart

      stuart - 2005-06-16

      Hi Jonah,
      I have used your script on a fresh install of RedHat ES4 with all upgrade patches.  The script completed.  However, I cannot achieve a Compiere Connection.  When I press the button "Test Application Server" the Terminal shows:
      --->CConnection.setAppsServerInfo/; jnp://
      - javax.naming.CommunicationException: Receive timed out [Root exception is Receive timed out]
      (and then there is more from the java.naming.provider.url etc)
      In order to try to solve this, I have installed your script a second time (after deleting the Product directory).  But with no success.
      The Compiere Connection box shows:
      Application Host:  <which is the IP address of the machine that I entered as the host>
      Application Port 1099  <and not ticked Tunnel Objects via http>

      Interestingly, the "Test Database" button completes ok with:
      Database Type: PostgreSQL
      Database Host:
      Database Port: 5432
      Database Name: cptst01
      User: compiere

      I would appreciate your help in resolving this.
      Best regards, Stuart

      • Chad Kitching

        Chad Kitching - 2005-06-24

        It's not documented anywhere in that message, but you must start up the jboss server.

        You can do this by running:
        ~/product/8.0.3/Compiere2/jboss/bin/ -c compiere

        (it can take a long time to initialize, so be very patient)

    • chris snow

      chris snow - 2005-06-18

      I am using fedora core 4 on PPC.  I have had to tweak the install script to use the IBM jdk, and I have to run manually.  When  I do, I get the following error:

      [snowch@mserv Compiere2]$ ./
      Install Compiere Server
      Setup Dialog
      *** 2005-06-18 03:28:40.872 Compiere Log (CLogConsole) ***
      03:28:40.871   CLogMgt.setLevel: CONFIG
      Exception in thread "main" java.lang.ExceptionInInitializerError
              at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
              at sun.awt.X11GraphicsEnvironment.<clinit>(
              at java.lang.Class.forName1(Native Method)
              at java.lang.Class.forName(
              at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
              at java.awt.Window.init(
              at java.awt.Window.<init>(
              at java.awt.Frame.<init>(
              at java.awt.Frame.<init>(
              at javax.swing.JFrame.<init>(
              at org.compiere.install.Setup.<init>(
              at org.compiere.install.Setup.main(
      Caused by: java.lang.NullPointerException
              at java.lang.ClassLoader.loadLibrary0(
              at java.lang.ClassLoader.loadLibrary(
              at java.lang.Runtime.loadLibrary0(
              at java.lang.System.loadLibrary(
              at Method)
              at sun.awt.font.NativeFontWrapper.<clinit>(
              ... 12 more

      *** 2005-06-18 03:28:41.198 Compiere Log (CLogConsole) ***

      Make .sh executable

      ./ line 41: utils/ No such file or directory

      Any ideas?

      Thanks in advance...

      • Jonah H. Harris

        Jonah H. Harris - 2005-06-22

        Hi Chris,

        Is your X terminal working properly?


        • chris snow

          chris snow - 2005-06-23

          I just found there is a bug with xterm on FC4 PPC.

          Will update the forum when I have more info.

    • Cal

      Cal - 2005-06-23

      I had similar symptoms, which turned out to be a database problem. Scan the jboss server log at $COMPIERE_HOME/jboss/server/compiere/log/server.log for errors and you might get a clue to your problem. In my case, a db error was causing servlet loading to fail.

    • yvon vieville

      yvon vieville - 2005-06-28

      Very great script, Thanks
      I'm a newbie with postgres and i've just a little problem with grant access  to host in pg_hba.conf.

    • stuart

      stuart - 2005-06-30

      hihone and chadk, thanks for your help on jboss.
      Chadk, I ran ~/product/8.0.3/Compiere2/jboss/bin/ -c compiere as suggested and it seemed to finish ok, after a very long time (as you indicated).
      However, I still get the following in the log:
      -----------> CConnection.setAppsServerInfo: jnp://AVT03:1099
      - javax.naming.CommunicationException: Receive timed out [Root exception is Rece ive timed out]
      - {java.naming.provider.url=jnp://AVT03:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory , jnp.discoveryTimeout=5000, jnp.timeout=5000, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, j np.sotimeout=5000} [11]

      Any further thoughts on what might be happening and how to fix it?
      Many thanks,

    • Jader_Simoes

      Jader_Simoes - 2005-07-05

      It seems that Im experimenting the same trouble. In fact jboss starts, but it logs serveral errors and tomcat is unable to do anything!

    • Calvin

      Calvin - 2005-07-07

      Hi there,

      I'm newbie to Compiere, so hope your can help.

      I was wondering anyone in Malaysia using Compiere with PostgreSQL database?

      And how your can handle Replication as like

      Thank you.


      • Trifon (An ADempiere founder)

        Hi Calvin

        I know one very good Compiere developer who is from Malaysia.

        He has one of the best sires for Compiere(

        I'm sure that he can help you.

        Compiere freelancer
        Compilo developer

    • Calvin

      Calvin - 2005-07-08

      Thanks Trifon,

      I will contact him soon.


    • Roberto Onnis

      Roberto Onnis - 2005-07-16

      Hi Jonah, thanks for your great work
      I used your script for installing CL in a SUSE distribution with no problems, i've a little trouble with my ubuntu distribution   but i'm working on it.

    • Vipen Mahajan

      Vipen Mahajan - 2005-07-18

      Hi Jonah,
      The concept of having a script for installing Compiere and postgres is truly great.
      I am having trouble to execute this script on a Redhat 9.0. The ftp address for downloading the postgresql-8.0.3.tar.bz2, is not operational.
      I tried to modify the script so some other ftp site can be used but ran into problems of port not available. Not being a techie, I stopped there.

      Any help will be appreciated.


    • Vipen Mahajan

      Vipen Mahajan - 2005-07-18

      The tail end of the install log is given below:
        300K ....                                                  100%  106.62 KB/s

      22:42:55 (78.25 KB/s) - `postgresql-8.0-311.jdbc2ee.jar' saved [311458/311458]

                 => `postgresql-8.0-311.jdbc3.jar'
      Resolving done.
      Connecting to[]:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 330,717 [application/octet-stream]

          0K .......... .......... .......... .......... .......... 15%   56.24 KB/s
         50K .......... .......... .......... .......... .......... 30%  146.63 KB/s
        100K .......... .......... .......... .......... .......... 46%  162.87 KB/s
        150K .......... .......... .......... .......... .......... 61%  257.73 KB/s
        200K .......... .......... .......... .......... .......... 77%  176.68 KB/s
        250K .......... .......... .......... .......... .......... 92%  183.82 KB/s
        300K .......... .......... ..                              100%  249.63 KB/s

      22:43:03 (135.81 KB/s) - `postgresql-8.0-311.jdbc3.jar' saved [330717/330717]

                 => `postgresql-8.0.3.tar.bz2'
      Resolving done.
      Connecting to[]:21... connected.
      Logging in as anonymous ... Logged in!
      ==> SYST ... done.    ==> PWD ... done.
      ==> TYPE I ... done.  ==> CWD /pub/postgresql/source/v8.0.3 ... done.
      ==> PORT ...
      Invalid PORT.

      It retries several times and then gives an error.


    • rob young

      rob young - 2005-07-22

      I have tried to start jboss server with
      ~/product/8.0.3/Compiere2/jboss/bin/ -c compiere

      But it seems to fail.

      Where does jbos get its database name??

      Web Port: 8080
      SSL Port: 4443
      Database Type: PostgreSQL
      Database Name: cptst01


      rob@kelyn:/var/log$ cat *2_0.log
      *** 2005-07-22 01:33:30.276 Compiere Log (CLogFile) ***
      01:33:30.275   CLogMgt.addHandler: addHandler=CLogFile[/var/log/2005-07-22_0.log,Level=ALL]
      01:33:30.305 Compiere.startup: Compiere(r) Release 2.5.2b_2005-02-26 - Smart ERP & CRM - (c) 1999-2005 Compiere (r); Implementation: e-Evolution,S.C. 20050321-1502 - Supported
      01:33:30.306 Compiere.startup: /Compiere2 - Java HotSpot(TM) Server VM 1.4.2_06-b03 - Linux 2.6.10-5-386 unknown
      01:33:30.307 Ini.loadProperties: #22
      01:33:32.688         Secure.decrypt: 637ee83fbd8595c0 => WARNING
      ===========> CConnection.getConnection: jdbc:postgresql://kelyn:5432/MyDBName?encoding=UNICODE, (1) AutoCommit=true,TrxIso=READ_COMMITTED - Backend start-up failed: FATAL: database "MyDBName" does not exist.
      ===========> Compiere.startupEnvironment: No Database

      *** 2005-07-22 01:33:32.98 Compiere Log (CLogFile) ***

    • rob young

      rob young - 2005-07-22

      One more question assuming you start jboss with
      ~/product/8.0.3/Compiere2/jboss/bin/ -c compiere 

      How are you starting PostgreSQL
      pg_ctl -l $PG_HOME/rdbms/log/pgsql.log start

      seems to work for me.

      But what should I be using

      Thanks in advance for any advice.

      rob@kelyn:/var/log$ echo $PG_HOME

1 2 > >> (Page 1 of 2)

Log in to post a comment.