Difference between revisions of "Install Prerequisites"

From iDempiere en
m (Reverted edits by Hieplq (talk) to last revision by CarlosRuiz)
m
Tag: visualeditor
 
(42 intermediate revisions by 11 users not shown)
Line 11: Line 11:
  
 
The examples on this guide are using the following versions:
 
The examples on this guide are using the following versions:
* Ubuntu 14.04.2 64 bits
+
* Ubuntu 22.04 64 bits
* PostgreSQL 9.4.1  (it's also tested and working with version 8.4.22)
+
* PostgreSQL 15
* PostgreSQL contrib (for UUID support)
+
** in certain scenarios is required to install PostgreSQL contrib (for UUID support)
* OpenJDK 1.7.0_75 (for version 2.1 it requires it works with 1.6.0_34)
+
* OpenJDK 17
  
 
But this guide can be used in other systems (even Windows) taking care of installing the corresponding packages and using corresponding commands.
 
But this guide can be used in other systems (even Windows) taking care of installing the corresponding packages and using corresponding commands.
 +
 +
NOTE: Installing git on windows install a git bash command which is capable of executing all the scripts same as in linux.
  
 
== Install Ubuntu ==
 
== Install Ubuntu ==
  
Please refer to http://www.ubuntu.com/download
+
Please refer to https://www.ubuntu.com/download
 +
 
 +
Downloaded and installed Ubuntu Server 22.04 LTS
 +
 
 +
== Install PostgreSQL 15 ==
  
== Install PostgreSQL 9.4.1 ==
+
=== Install ===
  
iDempiere can also run with Oracle 10G or 11G, and also with PostgreSQL 8.4 to 9.3, but for this tutorial we use postgresql 9.4.1 - see http://www.postgresql.org/download/linux/ubuntu/ for details
+
iDempiere can also run with Oracle 12C and later, and also with PostgreSQL 11 and later, for this How-To we use postgresql 15 - see https://www.postgresql.org/download/linux/ubuntu/ for details
  
  echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
+
  # Create the file repository configuration:
 +
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
 +
# Import the repository signing key:
 
  wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
 
  wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
 +
# Update the package lists:
 
  sudo apt-get update
 
  sudo apt-get update
  sudo apt-get install postgresql-9.4
+
# Install the version 15 of PostgreSQL.
  sudo apt-get install postgresql-contrib
+
  sudo apt-get -y install postgresql-15
 +
 
 +
'''IMPORTANT NOTE!'''<br>
 +
In other versions of linux you need to additionally install the package postgresql-contrib corresponding to the version you are installing.  In ubuntu is included by default, but in other cases is mandatory to install it, otherwise you'll get errors about the generate_uuid() function.<br>
 +
Also, instructions are different for other linux versions, in some you need to create and start the cluster, and also configure the service for auto-start.  Please refer to the specific [https://www.postgresql.org/download/ PostgreSQL] instructions for such cases.
 +
 
 +
=== Assign a password to user postgres ===
 +
 
 +
In order to create the database the installer needs to know the password of user postgres, by default this user doesn't have a password in ubuntu (windows installer asks for a password).
 +
 
 +
Please take note of the password you assign here as it will be required in the setup process:
 +
 
 +
Steps are (replace your_chosen_password by your preferred):
 +
 
 +
  echo "alter user postgres password 'your_chosen_password'" | sudo su postgres -c "psql -U postgres"
 +
 
 +
=== Configure pg_hba.conf ===
 +
 
 +
After installing postgres you must check the correct configuration of /etc/postgresql/15/main/pg_hba.conf
 +
 
 +
The following line requires change of the authentication method:
 +
<s>
 +
local  all            all                                    peer
 +
</s>
 +
Change to:
 +
local  all            all                                    scram-sha-256
 +
Please NOTE that some guides suggest configuring trust instead of md5 - but that creates a security issue on your postgres server.
 +
 
 +
And then reload the configuration:
 +
 
 +
sudo service postgresql reload
  
== Install OpenJDK 1.7.0_75 ==
+
== Install OpenJDK 17 ==
 +
sudo apt-get update
 +
sudo apt-get install openjdk-17-jdk-headless
  
sudo apt-get install openjdk-7-jdk
+
NOTE that openjdk-17-jdk-headless is for server without GUI, if you plan to use UI programs install openjdk-17-jdk instead. Also note that openjdk-17-jre is not sufficient because it doesn't have the jar command used in some scripts.
# Note - to work with iDempiere version 2.1 please install openjdk-6-jdk
 
  # Note - to work with iDempiere version 3.0 you can also use oracle java 8
 
  
 +
You can install also openjdk > 17, we recommend to use a long term supported like 17.
  
 
Now you have your prerequisites ready to receive the iDempiere installer
 
Now you have your prerequisites ready to receive the iDempiere installer
Line 43: Line 83:
 
== Troubleshooting ==
 
== Troubleshooting ==
  
=== Linux  ===
+
=== No postgres user ===
  
After installing postgres you must check the correct configuration of pg_hba.conf.
+
In the event that there's no 'postgres' role in your postgres db, you have to create on your own using the following steps:
These two entries must be configured to use password (md5):
+
 
  local  all        all                              md5
+
# Connect to your postgres db instance via psql.
  host    all        all        127.0.0.1/32          md5
+
# Create 'postgres' role via "CREATE USER postgres" without the double quote.
NOTE that some guides suggest configuring trust - but that creates a security issue on your postgres server.
+
# Alter the role and specify what the role suppose to be. EX. "ALTER USER postgres SUPERUSER CREATEDB" without the double quote.
 +
 
 +
=== Linux ===
 +
 
 +
==== InvocationTargetException on CentOS ====
 +
 
 +
On a CentOS server with minimum version you can get error on home page (by render graph) java.lang.InternalError: java.lang.reflect.InvocationTargetException
 +
 
 +
Suggested solution:
 +
  sudo apt install fontconfig
 +
  sudo yum install fontconfig
  
 
=== Windows ===
 
=== Windows ===
Line 58: Line 108:
  
  
''This tutorial is brought to you by [[User:CarlosRuiz|Carlos Ruiz]] from [http://globalqss.com GlobalQSS].  Feel free to improve directly or suggest using the Discussion tab.
+
''This tutorial is brought to you by [[User:CarlosRuiz|Carlos Ruiz]] from [https://www.bx-service.com/ BX Service GmbH].  Feel free to improve directly or suggest using the Discussion tab.
 +
 
 +
 
 +
[[Category:User Manual|I]]
 +
[[Category:Installation|L]]
 +
[[Category:Installation Linux]]
 +
[[Category:Installation Windows]]
 +
[[Category:Installation Server‏‎]]
 +
[[Category:Installation Database‏‎]]
  
[[Category:Install]]
+
<!-- breadcrumb -->
 +
<font size=-2>
 +
&lArr;
 +
[[Installing iDempiere|Table of Contents]] |
 +
Install Prerequisites |
 +
[[Downloading Installers]]
 +
&rArr;
 +
</font>

Latest revision as of 10:54, 29 December 2023

Table of Contents | Install Prerequisites | Downloading Installers

In order to run iDempiere you need to have a JDK (not JRE) version of java, and a proper database (PostgreSQL and Oracle are supported).

The examples on this guide are using the following versions:

  • Ubuntu 22.04 64 bits
  • PostgreSQL 15
    • in certain scenarios is required to install PostgreSQL contrib (for UUID support)
  • OpenJDK 17

But this guide can be used in other systems (even Windows) taking care of installing the corresponding packages and using corresponding commands.

NOTE: Installing git on windows install a git bash command which is capable of executing all the scripts same as in linux.

Install Ubuntu

Please refer to https://www.ubuntu.com/download

Downloaded and installed Ubuntu Server 22.04 LTS

Install PostgreSQL 15

Install

iDempiere can also run with Oracle 12C and later, and also with PostgreSQL 11 and later, for this How-To we use postgresql 15 - see https://www.postgresql.org/download/linux/ubuntu/ for details

# Create the file repository configuration:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
# Update the package lists:
sudo apt-get update
# Install the version 15 of PostgreSQL.
sudo apt-get -y install postgresql-15

IMPORTANT NOTE!
In other versions of linux you need to additionally install the package postgresql-contrib corresponding to the version you are installing. In ubuntu is included by default, but in other cases is mandatory to install it, otherwise you'll get errors about the generate_uuid() function.
Also, instructions are different for other linux versions, in some you need to create and start the cluster, and also configure the service for auto-start. Please refer to the specific PostgreSQL instructions for such cases.

Assign a password to user postgres

In order to create the database the installer needs to know the password of user postgres, by default this user doesn't have a password in ubuntu (windows installer asks for a password).

Please take note of the password you assign here as it will be required in the setup process:

Steps are (replace your_chosen_password by your preferred):

echo "alter user postgres password 'your_chosen_password'" | sudo su postgres -c "psql -U postgres"

Configure pg_hba.conf

After installing postgres you must check the correct configuration of /etc/postgresql/15/main/pg_hba.conf

The following line requires change of the authentication method:

local   all             all                                     peer

Change to:

local   all             all                                     scram-sha-256

Please NOTE that some guides suggest configuring trust instead of md5 - but that creates a security issue on your postgres server.

And then reload the configuration:

sudo service postgresql reload

Install OpenJDK 17

sudo apt-get update
sudo apt-get install openjdk-17-jdk-headless

NOTE that openjdk-17-jdk-headless is for server without GUI, if you plan to use UI programs install openjdk-17-jdk instead. Also note that openjdk-17-jre is not sufficient because it doesn't have the jar command used in some scripts.

You can install also openjdk > 17, we recommend to use a long term supported like 17.

Now you have your prerequisites ready to receive the iDempiere installer

Troubleshooting

No postgres user

In the event that there's no 'postgres' role in your postgres db, you have to create on your own using the following steps:

  1. Connect to your postgres db instance via psql.
  2. Create 'postgres' role via "CREATE USER postgres" without the double quote.
  3. Alter the role and specify what the role suppose to be. EX. "ALTER USER postgres SUPERUSER CREATEDB" without the double quote.

Linux

InvocationTargetException on CentOS

On a CentOS server with minimum version you can get error on home page (by render graph) java.lang.InternalError: java.lang.reflect.InvocationTargetException

Suggested solution:

sudo apt install fontconfig
sudo yum install fontconfig

Windows

Most installation problems in Windows are caused by not configured environment variables:

  • PATH must be configured to make the commands psql and jar accessible
  • JAVA_HOME environment variable must be configured


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 | Install Prerequisites | Downloading Installers

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