# Openbravo POS/Installation guide
## Program installation
### Install java

openbravo POS is an application developed in java and to execute it you will need the Sun Java Runtime Environment 1.4.2 or greater.

#### On Windows

You can install Java from Sun's website

#### On Ubuntu

Ensure to have the multiverse repository activated and type

### Download and unpack openbravo POS

Download the last version of the binary package of LibrePOS from Sourceforge, open it with your favourite decompresser and extract all the files to an empty folder.

### Run it!

In windows execute the file "start.bat", in Linux execute "start.sh" to make sure everything is running correctly. openbravo POS should display a warning alerting that it has found an empty database. Click OK to create the database structure necessary to run LibrePOS.
At this point you should decide whether you want to run LibrePOS on the built-in HSQLDB engine or, alternatively Database_configuration|use the MySQL or PostgreSQL databases

## Database configuration

LibrePOS supports four database engines: HSQLDB, MySQL, PostgreSQL and Oracle
LibrePOS uses HSQLDB by default for data storage. HSQLDB is bundled with the binary package of LibrePOS and offers an advantage in that it doesn't have to be configured. However, a lot of users choose other relational databases for performance or reliability.
To configure the database go to the configuration panel or run the file "configuration.bat" in windows or "configuration.sh" in linux. Please be aware that once you restart LibrePOS, it will tell you that your database is empty and will offer you to create tables for your new database. This is normal. Click the 'yes' button to allow LibrePOS to create the tables for you (In LibrePOS version 0.0.24 there should be 26 tables).
The properties related to the database configuration are:
| Driver library | Is the file provided by the database engine vendor that contains the JDBC driver that allows Java programs to communicate with the database. It is usually a JAR file. |
| Driver class | Is the java class name that implements the JDBC driver. This name is also defined by the database engine vendor. |
| URL | Is the connection string that uses JDBC to localize the JDBC the driver and the database. |
| User | The name of the authorized database user. |
| Password | The password of the database user. |

### MYSQL
#### On Windows

Download MySQL server (essentials package recommended) and install it.
Download MySQL Connector/J, unzip the contents and place it in the same folder where LibrePOS resides.
Alternatively you can install all-in-one packages that include also Apache, PHP and phpMyAdmin like WAMP Server or XAMPP

#### On Ubuntu

Activate the universe repository and do
You can also install phpMyAdmin
Connector/J is on /usr/share/java/mysql.jar. You can copy or link it to LibrePOS' folder

#### Usage

Create a user and a database. You can check MySQL documentation An example of a database configuration using MySQL as database engine is:

### PostgreSQL

To use LibrePOS with PostgreSQL you must have a PostgreSQL server running and the JDBC driver for PostgreSQL.

#### On Windows

Download the server and get the JDBC 3 driver according to your version

#### On Ubuntu

Ensure you have the universe repository activated and do
You can also install administrators like pgAdmin3 or phpPgAdmin
The JDBC lib is on /usr/share/java/postgresql.jar. You can copy or link it to LibrePOS' folder

#### Usage

After the database server is installed and running you have to create an empty database for LibrePOS and a database user with privileges to connect to this database. You can check PostgreSQL documentation
An example of a database configuration using PostgreSQL as database engine is:

### Oracle

Download and install Oracle XE and the JDBC Driver

#### Usage

An example of database configuration is