Tag Archives: postgresql

Related softwares:

  1. Ubuntu 9.04
  2. Postgresql 8.3
  3. Adempiere 3.4.2

Pre-requisite of installing Adempiere, is to setup a supported database which could be Oracle or Postgresql. In this article, I’ll be using Postgresql 8.3. To learn more on how to install Postgresql in Ubuntu, you can go here. Also, in Postgresql, create a login-role named adempiere and create a database named adempiere. Assign the owner of this adempiere database to adempiere login-role.

You need to download the Adempiere archive file from sourceforge.net URL below:
http://sourceforge.net/projects/adempiere/files/ADempiere%20Official%20Release/Adempiere%203.4.2-stable/Adempiere_342s.tar.gz/download

Unzip the archive file and you will get a folder named Adempiere. Place it anywhere to your liking. As for me, I will put it under /opt, so my $ADEMPIERE_HOME will be /opt/Adempiere.

First, you need to restore the database from the provided dump file. Run the command below:

sudo  -u postgres psql adempiere < $ADEMPIERE_HOME/data/Adempiere_pg.dmp

You will see in the console, the Postgresql script is running and creating the necessary tables and data into adempiere database.

Second, you need to execute the setup script. I found that before running the setup script, I need to give execution permission to the script. So type the following to do so:

sudo chmod +x $ADEMPIERE_HOME/RUN_setup.sh

Then I execute the setup script as below:

sudo $ADEMPIERE_HOME/RUN_setup.sh

You will get the Adempiere Server Setup dialog as below:
Adempiere Server Setup

If you don’t wish to use the default values, you can change it to below values:

  1. Web Port : 8088
  2. SSL : 4443
  3. Database Server : localhost
  4. Database Type : postgresql
  5. Database Name: adempiere
  6. System Password: [postgres password in Postgresql]
  7. Database User: adempiere
  8. Database Password: [adempiere password in Postgresql]

Click on the Test button, if everything goes well you should be able to see the Save button is enabled. Click on the Save button. A License Agreement dialog will pop-up. Click on Yes, I Understand and Accept button. You should be able to see on the console, where your ran the RUN_setup.sh script, is running and processing as shown below:
Adempiere Setup Console

Once you see, BUILD SUCCESSFUL in the console, you can close everything.

Next you can run the Adempiere script like below:

$ADEMPIERE_HOME/RUN_Adempiere.sh

By default, Adempiere comes with default data, so you can login with sample data. Try login with username and password as GardenAdmin.

At the time of writing, I’m using Ubuntu  9.04 and Postgresql 8.3.
To start installing Postgresql, just type below apt-get command in the terminal:

sudo apt-get install postgresql-8.3

Then you need to change the default Postgresql user named postgres. To do so, you need to login as postgres Ubuntu user. Type the following command to login into Postgres console as postgres user.

sudo -u postgres psql postgres

This will get you into Postgresql console. In order to change the default postgres password, type below in the terminal:

/password postgres

Postgresql console will ask you to enter the new password twice. To quit from the Postgresql console type the following:

/q

This change requires your Postgresql server to be restarted. Type the following command:

sudo /etc/init.d/postgresql-8.3 restart

To make your life easier when working with Postgresql, you might want to install the GUI-client called pgadmin-III. In the terminal, type the following:

sudo apt-get install pgadmin3

Once pgadmin-III is installed, you should be able to see the pgadminIII menu in your Ubuntu main menu as shown below.
screenshot_001