Installing Postgresql - Adempiere

boreddizzyData Management

Dec 16, 2012 (4 years and 11 months ago)

560 views

Table of Contents
Objective
.................................................................................................................
3
Organization of this guide
..................................................................................
3
Introduction
...........................................................................................................
4
About Adempiere
...............................................................................................
4
About OpenSolaris
............................................................................................
5
About Glassfish
..................................................................................................
5
Installing Postgresql
...............................................................................................
6
Using the IPS to install Postgresql
.....................................................................
6
Using the Package Manager GUI to install Postgres
....................................
6
Using Command Line to install Postgresql
.................................................
10
Manual Installation of Postgresql
....................................................................
11
Getting Postgresql Binary
...........................................................................
11
Installing Postgresql Binary
........................................................................
12
Preparing PostgreSQL
..........................................................................................
13
Installing Glassfish
...............................................................................................
19
Getting Glassfish
..............................................................................................
19
Installing Glassfish
..........................................................................................
20
Installing ADempiere
............................................................................................
22
Getting Adempiere
...........................................................................................
22
Installing Adempiere
........................................................................................
22
Deploying Adempiere to Glassfish
..................................................................
29
Using ADempiere
.................................................................................................
31
Running Swing Client
......................................................................................
31
Running Web Client
.........................................................................................
38
References
..........................................................................................................
41
Running ADempiere on OpenSolaris
Beginner's Guide
to
Running ADempiere on

OpenSolaris
Date:
06/23/09

Page
2
Of
41
Pages
Running ADempiere on OpenSolaris
1
Objective
This objective of this guide is to document the steps required to run Adempiere, the thick and thin

clients on OpenSolaris 2008.11 and 2008.05. This work verifies that Adempiere works on OpenSolaris

2008.11 and 2008.05. The guide documents the steps required to prepare Postgresql on OpenSolaris

2008.11 and 2008.05 for working with Adempiere. Further, the steps required to deploy Adempiere to

Glassfish v2 running on OpenSolaris 2008.11 and 2008.05 are presented.
By following the steps mentioned in this guide users will be able to
1.
Install Postgresql 8.3 or higher on OpenSolaris 2008.11 and 2008.05
2.
Configure Postgresql for Adempiere
3.
Install Glassfish v2 on OpenSolaris 2008.11 and 2008.05
4.
Deploy Adempiere to Glassfish v2
5.
Install Adempiere on OpenSolaris 2008.11 and 2008.05
6.
Run Adempiere on Glassfish v2 on OpenSolaris 2008.11 and 2008.05
Organization of this guide
This guide is organized as follows – Section 2 gives a brief introduction to the software used. Section 3

describes how to install Postgresql on OpenSolaris 2008.11 and 2008.05. Section 4 gives the steps to

configure Postgresql for using it with Adempiere. Section 5 describes installation steps for Glassfish

v2. Section 6 details the steps for installing Adempiere and deploying Adempiere to Glassfish. Section

7 gives the steps to verify the installation to make sure that the components are working as expected

and finally section 8 gives the references that were used in the preparation of this document.
Page
3
Of
41
Pages
Running ADempiere on OpenSolaris
2
Introduction
About Adempiere
Adempiere (
http://www.adempiere.com
) is an open source enterprise application founded on the

Bazaar principle as described in Eric Raymond's famous article '
The Cathedral and the Bazaar
'[
41
].

Adempiere is not just a product, it's a many-in-one enterprise solution. When deployed, Adempiere can

act as a

Enterprise Resource Planning solution

Supply Chain Management solution

Customer Relationship management solution

Point of Sale software

Financial Measurement Tool for an enterprise
The other benefits that Adempiere provides are

Adempiere is an open source application, meaning that customization is much easier than it

might be with other enterprise applications. The Adempiere community is a pretty vibrant one

and there are number of wikis, how-to guides and discussion forums for those who want to

work at the source code level.

Adempiere's architecture further makes the customization easier. With the Application

Dictionary concept, the entities can be managed at the application level rather than database

level. Windows and other visual components can also be tailored according to the needs of the

enterprise.

Adempiere's technology is another big plus. Adempiere is written in Java making it platform

agnostic. Thus Adempiere runs on practically every operating system – Solaris, OpenSolaris,

Ubuntu, Debian, CentOS, Red Hat, FreeBSD, NetBSD, OpenBSD, Apple Mac OS and

Windows 95/98/ME/2000/2003/XP/Vista/7.

Adempiere's underlying stack is quite flexible. Enterprises have the option of using the Swing

client or alternatively go for a Web solution based on either Glassfish or Jboss. Both the

supported application servers are enterprise class open source software. The flexibility does not

end here. The enterprises can chose from a variety of databases – Postgres, MySQL and Oracle

Page
4
Of
41
Pages
Running ADempiere on OpenSolaris
XE.

Adempiere is licensed under GPL v2. This means that the enterprises going for Adempiere

need not worry about the purchasing cost.

Adempiere is integrated with JasperReports – an open source report generation tool. This

integration allows the management to review the performance of their organization periodically

without incurring extra cost of a MIS.
About OpenSolaris
OpenSolaris (
http://opensolaris.org/
) is a UNIX operating system based on Solaris operating system.

The code base is referred to as Nevada. OpenSolaris integrates open source applications such as

Gnome, Mozilla, Open Office to deliver an easy to use platform. There are number of distinguishing

features of OpenSolaris such as storage management with ZFS, RBAC and debugging with Dtrace.

For the purposes of this article, we need to know about Image Packaging System (IPS) and Service

Management Facility (SMF).
Image Packaging System
, referred to as IPS from here on, is a newly introduced package

management solution. It allows the users to select and install new packages over the internet, without

worrying about the dependencies. IPS has both GUI and command line interfaces. Thus, IPS allows

the users and administrators to search, install and update the packages. The repository is configurable

meaning that package distribution and upgrade can also happen on company intranets. The IPS GUI

can be started by going to System → Administration → Package Manager. The command
pkg
along

with it's options and switches can also be used to accomplish the package management tasks.
The
Service Management Facility
, exposes services as entities that can be listed, searched and

managed using commands such as
svcs, svcadm
and
svccfg
. The services can be enabled,

disabled, started and stopped using
svcadm
. The logging of services provides an easy way of tackling

with failed services. Finally,
FMRI
(
Fault Managed Resource Identifier
)
needs to be mentioned.

FMRI provides a URI, which by definition is unique and allows the users to manage a service by

name. Many of the SMF commands require the FMRI to reference a service. The IPS search lists the

FMRIs along with the package search results.
About Glassfish
Glassfish (
http://glassfish.dev.java.net
) is an open source application server drawing it's code base

from Sun Java System Application Server Platform Edition 9 and TopLink. Glassfish implements

Java EE 5. Unlike some of the other open source application servers, Glassfish has extensive

documentation, number of discussion forums, aliases and blogs. Glassfish has SOA elements in the

form of JBI and BPEL support. Web Services and JPA support are some of the other notable features of

Glassfish.
Page
5
Of
41
Pages
Running ADempiere on OpenSolaris
3
Installing Postgresql
There are at least two ways of installing Postgresql on OpenSolaris. Depending on your comfort level

you can go with the IPS installation or with a direct download followed by a manual install. Postgresql

has OpenSolaris binaries available for each major release since 8.1. Typically, the IPS repository will

have only the stable versions, so if you want to download and test a beta version you need a direct

download.
Using the IPS to install Postgresql
As described earlier, IPS can be used to download and install packages. The following packages are

needed for Postgresql installation -

SUNWpostgr-83-server -
The binaries for PostgreSQL server

SUNWpostgr-83-client -
PostgreSQL client programs and libraries

SUNWpostgr-83-contrib -
Contributed source and binaries distributed with PostgreSQL

SUNWpostgr-83-devel -
PostgreSQL development header files and libraries
Using the Package Manager GUI to install Postgres
Open the package manager by going to System → Administration → Package Manager. Go to

Databases and select the packages mentioned above -
Page
6
Of
41
Pages
Running ADempiere on OpenSolaris
Now start the install/update process to begin downloading these packages. Dependencies if any will

also be downloaded and installed.
Page
7
Of
41
Pages
Running ADempiere on OpenSolaris
Now, initiate the installation process -
Page
8
Of
41
Pages
Running ADempiere on OpenSolaris
When the packages are installed, you will get success information as shown in the image below -
Page
9
Of
41
Pages
Running ADempiere on OpenSolaris
That's all to it. Postgresql is now installed. You can check the /usr/postgresql folder to verify the

installation.
praneet@opensolaris:~# ls /usr/postgres/8.3/
bin doc etc lib man share
Using Command Line to install Postgresql
As an alternative to the Package Manager GUI, you can also use
pkg
command to install Postgresql

on your system. The commands for installing Postgresql are -
praneet@opensolaris:~# pkg install SUNWpostgr-83-server
Page
10
Of
41
Pages
Running ADempiere on OpenSolaris
praneet@opensolaris:~# pkg install SUNWpostgr-83-client SUNWpostgr-jdbc

SUNWpostgr-83-contrib
praneet@opensolaris:~# pkg install SUNWpostgr-83-docs SUNWpostgr-83-devel
praneet@opensolaris:~# pkg install SUNWpostgr-83-tcl SUNWpostgr-83-pl
Manual Installation of Postgresql
Getting Postgresql Binary
Postgresql (
http://www.postgresql.org/
) can be downloaded in a number of ways. The most straight

forward way of obtaining the Postgresql OpenSolaris binary is using the
wget
command. To use

wget
you need to install
SUNWget
package from OpenSolaris repository. Just do a
praneet@opensolaris:~# pkg install SUNWwget
Once the package is installed you can check for the correctness by
praneet@opensolaris:~# which wget
/usr/bin/wget
Now, use
wget
to obtain the postgres binaries -
praneet@opensolaris:~# wget

"http://wwwmaster.postgresql.org/redir/198/h/binary/v8.4beta\
> /solaris/opensolaris/i386/postgresql-8.4beta1-opensolaris.i386-32.tar.bz2"
--15:04:29--

http://wwwmaster.postgresql.org/redir/198/h/binary/v8.4beta/solaris/opensolaris/i3
86/postgresql-8.4beta1-opensolaris.i386-32.tar.bz2
=> `postgresql-8.4beta1-opensolaris.i386-32.tar.bz2'
Resolving wwwmaster.postgresql.org... 217.196.146.204
Connecting to wwwmaster.postgresql.org|217.196.146.204|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location:

http://ftp9.us.postgresql.org/pub/mirrors/postgresql/binary/v8.4beta/solaris/opens
olaris/i386/postgresql-8.4beta1-opensolaris.i386-32.tar.bz2 [following]
--15:04:30--

http://ftp9.us.postgresql.org/pub/mirrors/postgresql/binary/v8.4beta/solaris/opens
olaris/i386/postgresql-8.4beta1-opensolaris.i386-32.tar.bz2
=> `postgresql-8.4beta1-opensolaris.i386-32.tar.bz2'
Resolving ftp9.us.postgresql.org... 128.111.24.43
Page
11
Of
41
Pages
Running ADempiere on OpenSolaris
Connecting to ftp9.us.postgresql.org|128.111.24.43|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10,781,528 (10M) [application/x-bzip2]
100%
[=================================================================================
=================================>] 10,781,528 43.84K/s ETA 00:00
15:14:32 (17.52 KB/s) - `postgresql-8.4beta1-opensolaris.i386-32.tar.bz2' saved

[10781528/10781528]

Alternatively, you can use web browser to download the OpenSolaris Postgresql binaries by following

the links from
http://www.postgresql.org/download/solaris
.
Installing Postgresql Binary
Installing Postgresql is also straightforward. The downloaded file contains everything required for

running Postgresql. Unzip and untar this file in a directory of your choice.
praneet@opensolaris:~# bzcat postgresql-8.4beta1-opensolaris.i386-32.tar.bz2 |tar

-xf -
This will create a folder named postgres which contains the entire installation.
You can now proceed to preparing Postgresql for Adempiere.
Don't forget to update your PATH once the installation is over.
Page
12
Of
41
Pages
Running ADempiere on OpenSolaris
4
Preparing PostgreSQL
After installation, you need to prepare your database for Adempiere. Good news is – PL/Java is not

required any more. So you can directly proceed to initializing your database. The steps are -
1.
Set up the password for the postgres role. The user postgres is already created for you. You

may want to change the password for the postgres user.
praneet@opensolaris:~# passwd postgres
New Password:
Re-enter new Password:
passwd: password successfully changed for postgres
2.
Become postgres. Do a
su – postgres
. You need to remember that
su – postgres
is

different from
su postgres
.
3.
Create a data directory. This directory stores all the information relating to the database. You

can also use a NFS mounted directory if you plan to use a storage system or use a different

machine for storing data. Also note that the owner of the data directory is the superuser of the

database.
4.
Make sure that the user postgres owns the data directory. If this is not the case do a
chown -R postgres:postgres data
5.
Now do an
initdb
to initialize the data directory -
praneet@opensolaris:/usr/postgres/8.3$ ./bin/initdb -D data
The files belonging to this database system will be owned by user

"postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".
fixing permissions on existing directory data ... ok
Page
13
Of
41
Pages
Running ADempiere on OpenSolaris
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the database server using:
./bin/postgres -D data
or

./bin/pg_ctl -D data -l logfile start
6.
Now start the database either by
praneet@opensolaris:/usr/postgres/8.3$ ./bin/pg_ctl -D data -l logfile start
OR by
praneet@opensolaris:/usr/postgres/8.3$ ./bin/postgres -D data
7.
Verify that the server has started and is listening on the designated port
praneet@opensolaris:/usr/postgres/8.3$ netstat -a | grep 5432
opensolaris.5432 *.* 0 0 49152 0 LISTEN
opensolaris.5432 *.* 0

0 49152 0 LISTEN
Page
14
Of
41
Pages
Running ADempiere on OpenSolaris
d459e218 stream-ord d9096cc0 00000000 /tmp/.s.PGSQL.5432
8.
Now create Adempiere User -
Login as postgres
praneet@opensolaris:/usr/postgres/8.3$ ./bin/psql
Welcome to psql 8.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=#
See who you are, this is equivalent of whoami on OpenSolaris
postgres=# select user;
current_user
--------------
postgres
(1 row)
See the list of current users by any one of the following methods -
postgres=# select * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd |

valuntil | useconfig
----------+----------+-------------+----------+-----------+--------
+----------+-----------
postgres | 10 | t | t | t | |

|
(1 row)

postgres=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd |

valuntil | useconfig
----------+----------+-------------+----------+-----------+----------
+----------+-----------
postgres | 10 | t | t | t | ******** |

|
Page
15
Of
41
Pages
Running ADempiere on OpenSolaris
(1 row)
As seen from the commands above, there is currently one user in the system. Now we will

create a user called adempiere and set its password to adempiere.
postgres=# CREATE USER adempiere SUPERUSER ENCRYPTED PASSWORD 'adempiere';
Verify that the user adempiere is created -
postgres=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd |

valuntil | useconfig
-----------+----------+-------------+----------+-----------+----------
+----------+-----------
postgres | 10 | t | t | t | ******** |

|
adempiere | 16384 | f | t | t | ******** |

|
(2 rows)
OR
postgres=# \du
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
adempiere | yes | no | no | no limit | {}
postgres | yes | yes | yes | no limit | {}
(2 rows)
9.
Now create the adempiere database. First see the current databases in the system –
postgres=# \l
List of databases
Name | Owner | Encoding
-----------+----------+----------
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(3 rows)
Create adempiere database using the command given below –
postgres=# CREATE DATABASE adempiere OWNER=adempiere ENCODING='UTF8';
Page
16
Of
41
Pages
Running ADempiere on OpenSolaris
CREATE DATABASE
Verify that the database has been created -
postgres=# \l
List of databases
Name | Owner | Encoding
-----------+-----------+----------
adempiere | adempiere | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(4 rows)
10.
Make sure that you are able to login as adempiere user. As of now there will be no relations in

the adempiere database.
praneet@opensolaris:/usr/postgres/8.3$ ./bin/psql -U adempiere -d adempiere
Welcome to psql 8.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
adempiere=#
adempiere=# \d
No relations found.
adempiere=# \q
11.
Now import the Adempiere Postgresql dump to populate your db. The Adempiere installation

tar file has the Postgresql database dump in Adempiere/data folder. The steps to download and

use the Adempiere installation file are presented in Section 6. If you are unsure, you can skip

this step and revisit it after you have completed Section 6.
praneet@opensolaris:/usr/postgres/8.3$ ./bin/psql -U adempiere -d adempiere

-f ${ADEMPIERE_HOME}/data/Adempiere_pg.dmp
…... Results truncated; you will see messages confirming that tables are
being altered.
Page
17
Of
41
Pages
Running ADempiere on OpenSolaris
12.
Now login to database as adempiere again. This time you should be able to see around 675

tables.
praneet@opensolaris:/usr/postgres/8.3$ ./bin/psql -U adempiere -d adempiere
Welcome to psql 8.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
adempiere=# \d
List of relations
Schema | Name | Type | Owner
-----------+-------------------------------+----------+-----------
adempiere | a_asset | table | adempiere

Results truncated for brevity.
Postgresql now has everything required to run Adempiere. If you want to run the web client proceed to

the next Section – Installing Glassfish, if you just want to run the thick client you can skip this section.
Page
18
Of
41
Pages
Running ADempiere on OpenSolaris
5
Installing Glassfish
Getting Glassfish
There are two ways of obtaining the Glassfish executable jar –
wget
command and a direct download.

To use
wget
type in
praneet@opensolaris:~$ wget "http://java.net/download/javaee5/v2.1_branch/promot

ed/SunOS_X86/glassfish-installer-v2.1-b60e-sunos_x86.jar"
--17:04:56-- http://java.net/download/javaee5/v2.1_branch/promoted/SunOS_X86/gl

assfish-installer-v2.1-b60e-sunos_x86.jar
=> `glassfish-installer-v2.1-b60e-sunos_x86.jar'
Resolving java.net... 64.125.132.39, 64.125.132.37
Connecting to java.net|64.125.132.39|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://download.java.net/javaee5/v2.1_branch/promoted/SunOS_X86/glassf

ish-installer-v2.1-b60e-sunos_x86.jar [following]
--17:04:56-- http://download.java.net/javaee5/v2.1_branch/promoted/SunOS_X86/gl

assfish-installer-v2.1-b60e-sunos_x86.jar
=> `glassfish-installer-v2.1-b60e-sunos_x86.jar'
Resolving download.java.net... 72.5.124.114
Connecting to download.java.net|72.5.124.114|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 61,959,141 (59M), 61,902,807 (59M) remaining [application/java-archive]
1% [>

] 645,316 --.--K/s ETA 1:49:43
100%
[================================================================================
Page
19
Of
41
Pages
Running ADempiere on OpenSolaris
==================================>] 61,959,141 30.39K/s ETA 00:00
18:00:25 (18.19 KB/s) - `glassfish-installer-v2.1-b60e-sunos_x86.jar' saved

[61959141/61959141]
Alternatively, Glassfish can be downloaded from

https://glassfish.dev.java.net/public/downloadsindex.html

Installing Glassfish
Installing the Glassfish executable jar requires an installed jre. You also need ant, but there is a

bundled ant that ships with Glassfish.
To start Glassfish installation do a
java -Xmx256m -jar glassfish-installer-v2.1-b60e-sunos_x86.jar
You will be presented with a license screen as shown in the image below
On accepting the license terms, the Glassfish installation will create a directory called glassfish and

Page
20
Of
41
Pages
Running ADempiere on OpenSolaris
will place all the files required for installing inside this directory.
Now go to the glassfish directory and execute the following commands -
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml
When this build process completes, you will have the default domain domain1 created and configured

for use. You should now put the bin folder of your Glassfish installation in your PATH. You can then

start the server by
asadmin start-domain
Note that Adempiere is currently not deployed to Glassfish now, so all you have now is the admin

console located at
http://<servername>:4848
and your home page located at

http://<servername>:8080.
Page
21
Of
41
Pages
Running ADempiere on OpenSolaris
6
Installing ADempiere
With the underlying stack of Postgresql and Glassfish installed, you are now all set to install and use

Adempiere.
Getting Adempiere
Adempiere binary is located at -
http://sourceforge.net/project/showfiles.php?group_id=176962
. The

binary is distributed as tar.gz file. As with other software, Adempiere binary can be downloaded using

either
wget
or the browser.
praneet@opensolaris:/tmp$ wget "http://superb-
west.dl.sourceforge.net/sourceforge/adempiere/Adempiere_353a.tar.gz"
--17:02:11-- http://superb-
west.dl.sourceforge.net/sourceforge/adempiere/Adempiere_353a.tar.gz
=> `Adempiere_353a.tar.gz'
Resolving superb-west.dl.sourceforge.net... 209.160.59.253
Connecting to superb-west.dl.sourceforge.net|209.160.59.253|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 161,230,251 (154M) [application/x-gzip]
100%[+++++++++++++++++++++++++++++++=================>] 161,230,251 63.49K/s

ETA 00:00
18:23:52 (55.42 KB/s) - `Adempiere_353a.tar.gz' saved [161230251/161230251]
Alternatively you can download the gzip installation file from

http://sourceforge.net/project/showfiles.php?group_id=176962
using web browser.
Installing Adempiere
Once you have the gz file, gunzip and untar it to a directory of your choice.
Page
22
Of
41
Pages
Running ADempiere on OpenSolaris
gunzip Adempiere_353a.tar.gz
tar xvf Adempiere_353a.tar
After doing this, you will get a directory named Adempiere containing all the installation files. This

directory will be used as ADEMPIERE_HOME. Now go inside this Adempiere directory and execute

the following steps -
chmod +x *.sh
export ADEMPIERE_HOME=`pwd`
./Run_Setup.sh
On running the Run_Setup.sh, you will be presented with installation screen. Verify that Java Home

has the correct value. Choose
glassfish
as the application server and
postgresql
as the

database. For
postgresql
, you also need to provide the system password. System password is

password for the user who owns the data directory. In our case, it's the postgres user who owns the

data directory and hence we need to provide the password of postgres user. If you are not sure what

this password is, you can change this password after becoming super user.
Page
23
Of
41
Pages
Running ADempiere on OpenSolaris
The image below shows the installation screen on 2008.05
Page
24
Of
41
Pages
Running ADempiere on OpenSolaris
Press the 'Save' button and if you don't have any errors in the values provided you will be presented

with the Key Store Dialog
Page
25
Of
41
Pages
Running ADempiere on OpenSolaris
Similar screen for 2008.05 is shown next -
Page
26
Of
41
Pages
Running ADempiere on OpenSolaris
Press the tick button and the build process will be initiated -
Page
27
Of
41
Pages
Running ADempiere on OpenSolaris
Similar screen for 2008.05 is shown next
Page
28
Of
41
Pages
Running ADempiere on OpenSolaris
Once the build process gets over, the installation window will automatically close and you will find

adempiere.ear under you glassfish folder. This is the file which will later be deployed to Glassfish. In

addition, you will also find two jar files – AdempiereSLib.jar and Adempiere.jar in the glassfish

folder.
Deploying Adempiere to Glassfish
Open login.conf in your domain's config directory. If you are using the defaults in the Glassfish

installation, you will have domain1 created in your domains folder. Open ${Glassfish-
home}/domains/domain1/config/login.conf and add the following line at the bottom -
Page
29
Of
41
Pages
Running ADempiere on OpenSolaris
adempiere {

org.adempiere.as.glassfish.AdempiereLoginModule required;
};
Open domain.xml located in the config folder of your domain and search for
<security-
service
. You will find a number of
<auth-realm
elements under
<security-service

elements. Add the following element under
<security-service
-
<auth-realm name="adempiere"

classname="org.adempiere.as.glassfish.AdempiereRealm">
<property name="jaas-context" value="adempiere" />
<property name="auth-type" value="adempiere" />
</auth-realm>
In domain.xml search for
<java-config
element. You will find a number of
<jvm-options>

element under
<java-config
. Add this line below
<java-config
-
<jvm-options>-DADEMPIERE_HOME=YourAdempiereHome</jvm-options>
Of course you need to replace YourAdempiereHome with the path of your Adempiere home. This is

the same directory that you used for setting the value of ADEMPIERE_HOME variable.
Page
30
Of
41
Pages
Running ADempiere on OpenSolaris
7
Using ADempiere
Running Swing Client
After completing the steps mentioned earlier, you are all set to start using Adempiere. To start using

the Swing client -
./Run_Adempiere.sh
For the first time, you will be presented with license agreement screen and connection setup screen as

shown below -

Page
31
Of
41
Pages
Running ADempiere on OpenSolaris
The connection screen on a 2008.11 is shown next -
Page
32
Of
41
Pages
Running ADempiere on OpenSolaris
The connection screen on 2008.05 is quite similar -
Page
33
Of
41
Pages
Running ADempiere on OpenSolaris
Fill in your database details and test the database -
Page
34
Of
41
Pages
Running ADempiere on OpenSolaris
Next, you will be presented with Adempiere login screen. By default GardenAdmin/ GardenAdmin

login is used. Just press the tick button and login.
Page
35
Of
41
Pages
Running ADempiere on OpenSolaris
On being successfully authorized, you will see a screen similar to the one shown below -
Pressing the OK button will lead you to Adempiere main screen where you can start using the system.
Page
36
Of
41
Pages
Running ADempiere on OpenSolaris
Now you can go the Menu tab and begin your work
Page
37
Of
41
Pages
Running ADempiere on OpenSolaris
That's all for the Swing client.
Running Web Client
1.
You can start the Glassfish server through command line by going to your Glassfish installation

directory and typing
./bin/asadmin start-domain
Page
38
Of
41
Pages
Running ADempiere on OpenSolaris
2.
To keep track of Adempiere deployment you may also do a tail -f of the log file which is
${Glassfish-home}/domains${your-domain}/logs/server.log
3.
Once you have the server running OpenSolaris, you can access it from any networked browser

client using

http://
<server-name>:<glassfish-port>/adempiere
The web interface is shown in the image below -
Page
39
Of
41
Pages
Running ADempiere on OpenSolaris
The System/System and all the other standard logins work for the Web interface as well.
All the Menu items will be available once you press the OK button.
Page
40
Of
41
Pages
Running ADempiere on OpenSolaris
8
References
1.
http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/



2.
http://www.adempiere.com/index.php/How_to_Run_ADempiere_on_OpenSolaris

3.
http://www.adempiere.com/index.php/Talk:How_to_Run_ADempiere_on_OpenSolaris

4.
http://www.adempiere.com/index.php/ADempiere_Install_Linux&PostgreSQL

5.
http://www.adempiere.com/index.php/Migration/DDLUtils

6.
http://ubuntuforums.org/showthread.php?t=725933

7.
http://www.posterita.org/mediawiki/index.php/PostgreSQL_Installation_on_Ubuntu_(with_PL/

Java)_for_ADempiere
8.
http://blogs.sun.com/praneet/entry/running_adempiere_in_glassfish

9.
http://blogs.sun.com/praneet/entry/five_simple_steps_to_debug

10.
http://www.adempiere.com/index.php/ADempiere_on_OpenSolaris


Page
41
Of
41
Pages