Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Compiere on PostgreSQL Install Script

2005-06-06
2013-05-02
1 2 > >> (Page 1 of 2)
  • 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.

    http://w3.tvi.edu/~jharris/CompiereLibero/install/scripts/pg_ent_and_cl_gen.sh

    Then, run it as follows:

    chmod 0755 pg_ent_and_cl_gen.sh
    ./pg_ent_and_cl_gen.sh

    Here is the info from my system:

    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

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

    NOTES
    - 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.

    OUTPUT FROM MY SYSTEM

    =============================================================
    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.
      David

       
      • David,

        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!

        -Jonah

         
    • 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 libpljava.so.1 && \ ln -s libpljava.so.1.1 libpljava.so.1
      cd /home/postgres/product/8.0.3/lib && \ rm -f libpljava.so && \ ln -s libpljava.so.1.1 libpljava.so
      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
      ERROR!

      Any idea about how to fix this error?

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

       
      • 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!

        -Jonah

         
    • carlos
      carlos
      2005-06-07

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

      Once again thank you!

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

         
    • 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.

      Nino

       
    • 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://192.168.1.3:1099
      - javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: 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:
      Name: 192.168.1.3{192.168.1.3-cptst01-compiere}
      Application Host: 192.168.1.3  <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: 192.168.1.3
      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/run.sh -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 RUN_setup.sh manually.  When  I do, I get the following error:

      [snowch@mserv Compiere2]$ ./RUN_setup.sh
      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>(X11GraphicsEnvironment.java:175)
              at java.lang.Class.forName1(Native Method)
              at java.lang.Class.forName(Class.java:180)
              at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
              at java.awt.Window.init(Window.java:268)
              at java.awt.Window.<init>(Window.java:312)
              at java.awt.Frame.<init>(Frame.java:431)
              at java.awt.Frame.<init>(Frame.java:396)
              at javax.swing.JFrame.<init>(JFrame.java:183)
              at org.compiere.install.Setup.<init>(Setup.java:37)
              at org.compiere.install.Setup.main(Setup.java:151)
      Caused by: java.lang.NullPointerException
              at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2159)
              at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1994)
              at java.lang.Runtime.loadLibrary0(Runtime.java:824)
              at java.lang.System.loadLibrary(System.java:908)
              at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:76)
              at java.security.AccessController.doPrivileged1(Native Method)
              at java.security.AccessController.doPrivileged(AccessController.java:287)
              at sun.awt.font.NativeFontWrapper.<clinit>(NativeFontWrapper.java:68)
              ... 12 more

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

      Make .sh executable

      ./RUN_setup.sh: line 41: utils/RUN_UnixEnv.sh: No such file or directory

      Any ideas?

      Thanks in advance...

       
      • Hi Chris,

        Is your X terminal working properly?

        -Jonah

         
        • 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.
      Thanks

       
    • stuart
      stuart
      2005-06-30

      hihone and chadk, thanks for your help on jboss.
      Chadk, I ran ~/product/8.0.3/Compiere2/jboss/bin/run.sh -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 java.net.SocketTimeoutException: 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,
      Stuart

       
    • 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
      Oracle?

      Thank you.

      Regards,
      Calvin

       
      • Hi Calvin

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

        He has one of the best sires for Compiere(red1.org).

        I'm sure that he can help you.

        Regards,
        Trifon
        --------------
        Compiere freelancer
        Compilo developer

         
    • Calvin
      Calvin
      2005-07-08

      Thanks Trifon,

      I will contact him soon.

      Regards,
      Calvin

       
    • 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.
      Regards
      Roberto

       
    • 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.

      vmahajan

       
    • Vipen Mahajan
      Vipen Mahajan
      2005-07-18

      Hi,
      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]

      --22:42:55--  http://jdbc.postgresql.org/download/postgresql-8.0-311.jdbc3.jar
                 => `postgresql-8.0-311.jdbc3.jar'
      Resolving jdbc.postgresql.org... done.
      Connecting to jdbc.postgresql.org[200.46.204.71]: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]

      --22:43:03--  ftp://ftp3.us.postgresql.org/pub/postgresql/source/v8.0.3/postgresql-8.0.3.tar.bz2
                 => `postgresql-8.0.3.tar.bz2'
      Resolving ftp3.us.postgresql.org... done.
      Connecting to ftp3.us.postgresql.org[64.94.171.114]: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.
      Retrying.

      It retries several times and then gives an error.

      VMahajan

       
    • rob young
      rob young
      2005-07-22

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

      But it seems to fail.

      Where does jbos get its database name??

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

      from
      /var/log/2005-07-22_0.log

      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: Compiere.properties #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@kelyn:/var/log$

       
    • rob young
      rob young
      2005-07-22

      One more question assuming you start jboss with
      ~/product/8.0.3/Compiere2/jboss/bin/run.sh -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.

      N.B.
      rob@kelyn:/var/log$ echo $PG_HOME
      /home/rob/product/8.0.3

       
1 2 > >> (Page 1 of 2)