Installing from Installers

From iDempiere en

Table of Contents | Downloading Installers | Installing from Installers | Running iDempiere from Installers

Create user

It is recommended to run the iDempiere server as a user created for such purpose, usually idempiere, instead of running as root.

So, let's create first a user:

adduser idempiere

So important that we need to repeat and emphasize: DO NOT install idempiere as root.

Install Server

  • Unzip the server installer you downloaded or created, for example:
jar xvf idempiereServer11Daily.gtk.linux.x86_64.zip
  • Move the folder to /opt
mv idempiere.gtk.linux.x86_64/idempiere-server /opt
rmdir idempiere.gtk.linux.x86_64
chown -R idempiere:idempiere /opt/idempiere-server

Graphical

From now on is preferable that you run everything as idempiere user:

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server
sh setup-alt.sh

NOTE: optionally you can add a LOG LEVEL parameter (accepted values are: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL). For example sh setup-alt.sh FINE


  • You can fill the parameters as shown in the screenshot, or with your own preferred values, especially you must take care of the following:
    • iDempiere Home: This is the repository folder
    • Web Port / SSL: be careful to not use a port that is already used by another application, in linux ports below 1000 cannot be used by non-root users. For example, in some systems port 8080 is sometimes used by Oracle-XE
    • DB Already Exists: in common installation you must leave this flag unchecked as the database will be created later
    • Database Name: here we fill with the name of the database you want to create
    • DB Admin Password: must be filled with the postgres password you set up in the prerequisites
    • Database User: this is a user to be created, it is recommended you keep it as the default adempiere
    • Database Password: fill here with the password you want to assign to the database

Screenshot-Adempiere Server Setup.png

And finally push the Save button, if something fails the Save button will be disabled and the failing option is marked in red, in order to re-enable the Save button you must push the Test button until all errors are gone.
The only valid error in red is in front of Database Password field when the database is still not created.

Differences for Oracle

On oracle some fields must be filled slightly different:

    • Database Name: here you must fill the name of the oracle instance (usually xe or orcl)
    • DB Admin Password: must be filled with the SYSTEM password you set when installing oracle
    • Database User: in oracle you can define your preferred user here
    • Database Password: fill here with the password you want to assign to the database

Console

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server
sh console-setup-alt.sh

NOTE: optionally you can add a LOG LEVEL parameter (accepted values are: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL). For example sh console-setup-alt.sh FINE


This is to be used when you don't have a graphical environment, in this case the parameters are shown in screen and you must fill them directly with the keyboard.

Silent

There is another non-graphical non-interactive way to run the setup.

You need to have a previous idempiereEnv.properties file that you copied from another server, or you filled manually copying and replacing from the idempiereEnvTemplate.properties.

Here are some idempiereEnvTemplate.properties actions and considerations when using the silent setup:

  • Open the idempiereEnvTemplate.properties file.
  • JAVA_HOME needs to be set correctly. The following command should give you an accurate value:
    • dirname $( dirname $( readlink -f /usr/bin/java ) )
    • example: /usr/lib/jvm/java-17-openjdk-amd64
  • ADEMPIERE_DB_PASSWORD needs to be set to the postgresql 'adempiere' user password.
  • ADEMPIERE_DB_SYSTEM needs to be set to the postgresql 'postgres' user password.
  • ADEMPIERE_KEYSTORE should be commented out since this file probably does not exist yet. The setup process will create and set this value for you.
  • ADEMPIERE_DB_EXISTS should be set to "Y" if the database has already been created.
  • IDEMPIERE_JAVA_OPTIONS update according to the size of your server (example: -Xms1G -Xmx1G)
  • Copy the idempiereEnvTemplate.properties (along with your previous edits) to idempiereEnv.properties
  • Keep a copy of your idempiereEnvTemplate.properties edits in a safe place (outside of the idempiere-server directory) in case the file gets overwritten in a future upgrade.


After you have a valid idempiereEnv.properties you can execute:

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server
sh silentsetup-alt.sh

NOTE: optionally you can add a LOG LEVEL parameter (accepted values are: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL). For example sh silent-setup-alt.sh FINE

This is to be used when you don't have a graphical environment, and is non-interactive, the program read all the values from the file idempiereEnv.properties and configure the system with that.

Import the Database

This is the default way to import the database for oracle (>=12c) and postgresql (>=11):

After setting up the server (is a prerequisite) you can run:

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server/utils
sh RUN_ImportIdempiere.sh

Note: In order for the above import script to work, you need to make sure that you have the jar and psql or Oracle executables on your path.

Important Note for Oracle: In order to import the seed database it is required to create a directory object pointing to data/seed, for this to work properly the dba group needs access to this folder. The script utisl/oracle/ImportIdempiere.sh gives this access using chgrp dba, this doesn't work unless the idempiere user is member of the dba group, so this instruction is required as a prerequisite for oracle:
usermod -G dba idempiere
and the IDEMPIERE_HOME folder must be accessible by this group otherwise you'll find errors trying to import

Update the Database

In order to keep the database synchronized with the code it is required to run the following script:

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server/utils
sh RUN_SyncDB.sh

Register version code in database

In order to sign the database with the version code running on the server it is advised (or required depending on configuration) to run the following script:

su - idempiere  # not necessary if you're already as user idempiere
cd /opt/idempiere-server
sh sign-database-build-alt.sh


This tutorial is brought to you by Carlos Ruiz from BX Service GmbH. Feel free to improve directly or suggest using the Discussion tab.

Table of Contents | Downloading Installers | Installing from Installers | Running iDempiere from Installers

Cookies help us deliver our services. By using our services, you agree to our use of cookies.