Adempiere

Adempiere: Installation

http://www.adempiere.com/Installing_ADempiere_3.7.0_on_Ubuntu_11.04

 

This is a simple how to install ADempiere 3.7.0 on Ubuntu 11.04. There are alot of installation How-To’s, the reason I believe this might be useful is that the new 3.7.0 has some little twist in the installation and lots of the installation manuals here in the wiki are outdated. I will keep it as simple as possible to allow anyone new to ADempiere and even to Ubuntu to be able to get ADempiere running.

 

Contents

[hide]

OS Installation

  • Install Ubuntu 11.04 directly on a PC or as a VM.
  • During the installation, set “adempiere” as the username, that will make things a bit easier later on

 

ADempiere Pre-Installation Routine

  • After the installation finishes, lets get going with downloading the needed files. Open a Terminal Screen and type the following:
wget http://sourceforge.net/projects/adempiere/files/ADempiere%20Official%20Release/Adempiere%203.7.0-LTS/Adempiere_370LTS.tar.gz/download
mv download Adempiere_370LTS.tar.gz

wget http://sourceforge.net/projects/adempiere/files/ADempiere%20Official%20Release/Adempiere%203.7.0-LTS/Adempiere_370LTS.tar.gz.MD5/download
mv download Adempiere_370LTS.tar.gz.MD5

These commands will download the ADempiere installation files as well as the MD5 checksum file to make sure the downloaded file is OK. Sometimes because of wget the file downloaded will be named “download”, hence the renaming

 

  • Make sure the checksums are identical
md5sum Adempiere_370LTS.tar.gz
cat Adempiere_370LTS.tar.gz.MD5

If not, redownload the installation file

 

  • Unpack ADempiere in the current location and move it to /opt/Adempiere
tar zxvf Adempiere_370LTS.tar.gz
sudo mv Adempiere /opt/.

You can actually choose that path how you wish to move ADempiere to, just remember where you put it! When prompted to type the sudo password, enter the password you set during the OS installation.

 

  • Get into the ADempiere directory and set all .sh files to executable.
cd /opt/Adempiere
sudo chmod +x *.sh
sudo chmod +x utils/*.sh

ADempiere version 3.6.0 did not require this step

 

  • Set the Environment Variables
sudo nano /etc/environment

This will open a simple text editor. Scroll to the end and type the following two lines at the end. This will make sure the variables are set correct and loaded

export JAVA_HOME=/usr/lib/jvm/default-java
export ADEMPIERE_HOME=/opt/Adempiere

Press Ctrl+X, Press Y, Press <enter> to save the changes.

 

PostgreSQL Installation

  • Install PostgreSQL and OpenJDK
sudo apt-get install postgresql default-jdk

At this step on a Ubuntu 11.04 we are installing Postgresql 8.4 and OpenJDK-6. Both are needed to run ADempiere!

 

  • Next you will have to edit some settings to PostgreSQL to allow ADempiere to connect to its database.
sudo nano /etc/postgresql/8.4/main/pg_hba.conf

This will open the editor again and scroll down to the end which looks like this:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

Here you will need to know what subnet your local LAN is working on. Usually that is 192.168.1.X but you need to know that in order to set the permission right. At this example, I am assuming that your local network uses the subnet 192.168.1.0/24. In this case, what you want is for it to look like this:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
host    all         all         192.168.1.0/24        trust
# IPv6 local connections:
host    all         all         ::1/128               trust

Again, when done: Press Ctrl+X, Press Y, Press <enter> to save the changes

 

  • Another file to edit for PostgreSQL is the following
sudo nano /etc/postgresql/8.4/main/postgresql.conf

Here you need to find the line

#listen_addresses = 'localhost'

and change it to listen_addresses = ‘*’ (note that the # at the beginning is also missing) also find the line

#password_encryption = on

and change it to

password_encryption = on

Again, when done: Press Ctrl+X, Press Y, Press <enter> to save the changes

 

  • Restart Postgresql to take the changes
sudo service postgresql restart

Should the service not start for any reason, double check the changes, you probably missed something or mistyped.

 

ADempiere Installation

  • Now we are getting to the actual ADempiere installation. In case you are using a Desktop version of Ubuntu, you can do the following:
cd /opt/Adempiere
sudo ./RUN_setup.sh

This will open up a nice screen where you can edit the setup information. What you want to definitely set is the ADempiere Home path (In this case to /opt/Adempiere) and make sure there are no settings set to “localhost”. Instead of “localhost”, use directly the IP address of the Ubuntu PC you are working on. Also check what port is used as Webport, you will need it later. On ADempiere 3.7.0 this is set by default to 80, change to 8080. Same goes for the 443 port, change that to 8443. Press Test to make sure all is OK and then Save. Click OK on the rest of the screens.

 

  • In case you are working with the server edition of Ubuntu and you have no Desktop, you need to do the following to have the same effect as above:
cd /opt/Adempiere
cp AdempiereEnvTemplate.properties AdempiereEnv.properties
nano AdempiereEnv.properties (delete localhost and set the IP, set ADempiere Home to /opt/Adempiere and check the web/ssl port used)
sudo ./RUN_silentsetup.sh

You will get some errors that the database was not found, dont worry, we will fix that

 

  • The next step is only needed if Postgresql 8.4 was installed (which is by default in Ubuntu 11.04)
nano /opt/Adempiere/data/Adempiere_pg.dmp

The ADempiere 3.7.0 Database dump seems to be set to PostgreSQL 9 and has a command that is not accepted by PostgreSQL 8.4. For that reason you need to find the line at the beginning of the file

CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;

And edit it this way:

CREATE PROCEDURAL LANGUAGE plpgsql;

 

  • After you did this, you are ready to install the ADempiere database.
cd /opt/Adempiere/utils/
sudo ./RUN_ImportAdempiere.sh

You should get two notices and a error at the beginning but the Import goes through. NOTICE: schema “adempiere” does not exist, NOTICE: schema “sqlj” does not exist, ERROR: schema “sqlj” does not exist

 

  • Next you need to re-initialize ADempiere
cd ..
sudo ./RUN_silentsetup.sh

This will run Setup again and it will finish without any errors about database not found

 

ADempiere Start

  • After this your ADempiere server is installed and all you need is to start it!
cd /opt/Adempiere/utils
sudo ./RUN_Server2.sh

This will start the server process and after a minute or two you are able to use ADempiere. When you see the line

INFO  [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in Xm:XXs:XXXms

you are ready to access ADempiere.

 

  • To access ADempiere simply point your web browser to <ADempiere_Server_IP>:<Web_Port>

By default the webport is 80

Leave a Reply

Your email address will not be published. Required fields are marked *