Skip to main content

Installing ADempiere 3.7.0 on Ubuntu 11.04

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

Popular posts from this blog

Tuning postgresql for better performance - ADempiere ERP

PostgreSQL is a highly customizable relational database management system (RDBMS) with a dazzling array of configuration options.   The postgresql.conf file is located in the \PostgreSQL\9.x\Data folder. You can tune the following sections of the postgresql.conf file to get the best performance.     CONNECTIONS AND AUTHENTICATION In this section change the following entries to the following: max_connections = 350 authentication_timeout = 7min RESOURCE USAGE (except WAL) In this section change the following entries to the following: shared_buffers = 256MB : PG Backends that need to access tables first look for needed blocks in this cache. If they are already there, they can continue processing right away. The change can be made with a   postmaster  command-line flag or by changing the value of   shared_buffers temp_buffers = 32MB max_prepared_transactions = 20 work_mem = 1024MB maintenance_work_mem = 1024MB QUERY TUNING effective_cache_size = 2048MB R

Installation of Adempiere ERP on Windows

              This installation instruction is intended for initial installations where the database, application server and client all run on the same machine. For more complex installations, see   Installation Steps . An installation can take as little as 15 or 20 minutes if you start with the required downloads and do everything correctly. Other alternatives you might want to investigate are the   Windows Installer   or VMWare/VirtualBox AVA packages. However, the following method will give you much more control over the installation including upgrades with the latest patches and scripts. Before you begin, download each of the following packages: §   Java SE Development Kit   - Get the latest from   http://java.sun.com/javase/downloads/index.jsp . You only need the   JDK   without JavaFX, EE or NetBeans bundles. §   Postgre SQL   - Get the latest Windows install from   http://www.postgresql.org/download/windows . §   ADempiere Latest Release   - Download the latest Ad

Send Email Through Adempiere ERP

Send Email Through Adempiere E-Mail Configuration in Adempiere Mail Server This will specify the mail server to use Default: mailserver.(domain portion of %{serverFQDN}) Example: smtp.gmail.com Admin Email Use the default administrative mail address and it can be overwritten on client level Default: adempiere@(domain portion of %{ serverFQDN}) Example: teksalahadempiere@gmail.com Mail User Here we specify user of the default mail account Default: adempiere Example: teksalahadempiere Mail Password The password of the default mail account Default: adempiere Example: ********** 1    2.     Configuring Email in the client window The Client Definition Tab defines a unique client Step 1 .Login as admin Step  2 . Go to Menu -> System Admin -> Client Rules -> Client. In tab client fill fields’ mail host, request email request user and request user password. Finally press Test Email Button