Install ADempiere on Ubuntu 20.04 LTS
This tutorial will walk you through the process of installing ADempiere 3.9.0 on Ubuntu 20.04 LTS. There are several installation How-To guides available on the internet, making it difficult to choose which to use. Many of the wiki's installation tutorials are out of date and hence useless. I'll keep it as simple as possible so that anyone new to ADempiere or Ubuntu can get it up and running for both development and production environments. First part of this tutorial will focus on getting our development environments ready for further customization of ADempiere.
In this guide, we must complete our tasks inside two unique operational sections, each of which has a list of subsections that must be completed. I have listed them below so that you can understand big picture first before going further.
#
Section 1: Preparing The Environment for ADempiere Installation- Install
JDK
from the OS package repository - Configuring the
JAVA_HOME
environment variable - Configuring the
_JAVA_OPTIONS
environment variable. - Setup the PostgreSQL Database Server
- Creating an adempiere database user role
- Creating an adempiere database.
- Granting full access to the adempiere db user on the adempiere database.
- Setting up Postfix mail for sending adempiere local system mails.
#
Section 2: ADempiere Setup and Installation- Download the ADempiere installation archive from the ADempiere GitHub source.
- Download the MD5 checksum content file for the ADempiere release installation archive from the ADempiere GitHub repository.
- Create an MD5 checksum of the ADempiere Installation Archive file and compare it to the downloaded checksum value.
- If the checksum does not match, download the ADempiere Installation Archive file again.
- Move the Adempiere installer archive file to the
/opt
directory. - Ensure that all.sh shell scripts are located in
/opt/Adempiere
and/opt/Adempiere/utils
. - Allow the
root
user to utilize the local user's graphical console. - For the first time, execute
/
opt/Asempiere/Run_setup.sh`. - Verify that all prerequisite tasks have been completed.
- If the installer has meet` all of the initial requirements, we proceed with the installation.
#
Ubuntu OS InstallationOS Installation is not covered in this tutorial as our focus here is installing ADempiere ERP Software . There is a dedicated tutorial for that. In this tutorial we assume that you have already installed an Ubuntu 20.04 LTS Linux VM with a static IPv4 address and connection to the internet is established and working.
#
Java JDK InstallationJava is installed from the Ubuntu repositories. Ubuntu 20.04 includes OpenJDK version 8, which is compatible with the ADempiere version 3.9.0 release that we choose to install.
- To install OpenJDK-8 run:
JAVA_HOME
environment variable#
Setting up - Edit the configuration file
/etc/environment
- Add the following code at the end of the above file
- Use key sequence below to save the content in
nano
editor
Livecast:
Setting up JAVA_HOME environment variable
Important!
Exception in thread main java.lang.OutOfMemoryError: Java heap space
or java.lang.OutOfMemoryError: GC overhead limit exceeded
exceptions might occur at any time. These issues could be caused by a lack of memory capacity on your JVM, and you should increase the heap size to resolve them.
Adempiere
This may occur in ADempiere Java Client
while running a heavy Jasper Report, requiring you to tune JVM heap size in the system on which ADempiere Java Client is running, or during a month end web-based report processing using Jboss or Tomcat webserver in your ADempiere App Server
, requiring you to tune your JVM in your App Server.
You can use following two commands to find the default MaxHeapSize
variable of your current java installation.
- Command
option-1
in Linux to viewMaxHeapSize
Output:
- Command
option-2
in Linux to viewMaxHeapSize
Output:
Note
The default MaxHeapSize
in this example system is 2
GB, with a total system memory of 8
GB. It accounts for around 25% of the system's overall RAM.
#
Setting Up MaxHeapSize in Ubuntu 20.04- Add the following code
#
Install Percona Distribution for PostgreSQL on UbuntuPercona Distribution for PostgreSQL
Percona Distribution for PostgreSQL provides the best and most critical enterprise components from the open source community, in a single distribution, designed and tested to work together. Patroni, pgBackRest, pg_repack, and pgaudit are among the innovative components we utilize. Backed by Percona’s world-class support and engineering teams, Percona Distribution for PostgreSQL gives companies the peace of mind that these components are tested and configured to work together, with 24×7 support.
Take Care
Ubuntu systems that use the apt package manager include the upstream PostgreSQL server package (postgresql-15) by default. The components of Percona Distribution for PostgreSQL 15 can only be installed together with the PostgreSQL server shipped by Percona (percona-postgresql-15). If you wish to use Percona Distribution for PostgreSQL, uninstall the PostgreSQL package provided by your distribution (postgresql-15) and then install the chosen components from Percona Distribution for PostgreSQL.
#
Installation ProcedureRun all the commands in the following sections as root or using the sudo command:
#
Configure Percona repository- Install the percona-release repository management tool to subscribe to Percona repositories:
- Fetch
percona-release
packages from Percona web:
- Install the downloaded package with
dpkg
:
- Refresh the local apt package cache:
- Enable the repository
#
Install packages#
Start the serviceThe installation process automatically initializes and starts the default database. You can check the database status using the following command:
#
Connect to the PostgreSQL serverBy default, postgres
user and postgres
database are created in PostgreSQL upon its installation and initialization. This allows you to connect to the database as the postgres
user.
Open the PostgreSQL interactive terminal:
TIP
You can connect to psql as the postgres user in one go:
To exit the psql
terminal, use the following command: