Installation guide | DNet eBusiness Suite

Attila Mathe

Version: 1.0.0.M3

Copyright © 2010, 2011 Nan21 Electronics SRL


Table of Contents

1. Introduction
2. Quick installation
Prerequisites
Installing from the zip download
3. Advanced installation concepts
Configure database
MySQL 5.x
Oracle 9,10,11,XE
Other database
Static content provider

List of Examples

3.1. DNet-Core extjs user interface elements
3.2. DNet-Modules extjs user interface elements

Chapter 1. Introduction

Chapter 2. Quick installation

Prerequisites

DNet eBusiness Suite requires Java 6 or later to be installed. It is available from http://www.java.com

Installing from the zip download

Extract the contents of the archive somewhere on your computer, lets say C:/dnet Inside you should find a virgo-tomcat-server-xxx folder which contains a Virgo web-server already configured to run DNet; xxx stands for the server version, at the time of writing this document is 3.0.1-RELEASE. So go to virgo-tomcat-server-xxx/bin folder and double-click the startup.bat .

It opens a console window showing the steps performed during startup. Wait to finish then go to your browser and type in the adress bar:

http://localhost:8081/nan21.dnet.core.welcome

Click the logo which redirects you to the application setup section. Sign-in with user 'admin' and password 'admin'.

Follow on-screen instructions.

Note

The default configuration uses H2 database and creates its files in $USER_HOME/dnet_ebs/dnet_db_h2 directory, where $USER_HOME is your user home on you computer.

Chapter 3. Advanced installation concepts

Configure database

To configure DNet to work with a different database as the one in the demo package, generally speaking, you have to install the database engine on your computer, create the database user and schema, configure the DNet parameters in the properties file to point to the desired database and optionally provide the jdbc connector specific for your database.

MySQL 5.x

Ensure you have MySQL already installed and started.

In a command window (on Windows) navigate to your Mysql installation folder(assume it is MYSQL_HOME_FOLDER): cd MYSQL_HOME_FOLDER/bin Then start the mysql command-line tool: mysql --user=root --password=root Replace with your own password in the line above. Create the database and the user:

	CREATE DATABASE dnet CHARACTER SET utf8;
	CREATE USER dnet IDENTIFIED BY 'dnet';
	GRANT ALL PRIVILEGES ON dnet.* TO 'dnet'@'%' IDENTIFIED BY 'dnet'; 
			

Type exit; to return to shell/dos control. Open net.nan21.dnet.properties file and comment the existing database configuration and uncomment the MySQL properties under DATABASE CONFIGURATION section. You should have the following as a result:

	jdbc.driverClassName=com.mysql.jdbc.Driver
	jdbc.url=jdbc:mysql://localhost:3306/dnet
	jdbc.username=dnet
	jdbc.password=dnet
			

In case you used some other schema/user replace the values accordingly. Also ensure that the host and port are correct. These are the default values for an installation on your local computer. The jdbc driver for MySQL is provided with DNet.

Oracle 9,10,11,XE

Ensure you have Oracle already installed and started.

Connect to Oracle with SQL*Plus or a similar client and execute:

	CREATE USER DNET IDENTIFIED BY DNET;
	GRANT CONNECT, RESOURCE, CREATE TABLE, CREATE VIEW, CREATE SEQUENCE TO DNET;
			

Open net.nan21.dnet.properties file and comment the existing database configuration and uncomment the Oracle properties under DATABASE CONFIGURATION section. You should have the following as a result:

	jdbc.driverClassName=oracle.jdbc.OracleDriver
	jdbc.url=jdbc:oracle:thin:@localhost:1521:XE
	jdbc.username=DNET
	jdbc.password=DNET
			

In case you used some other schema/user replace the values accordingly. Also ensure that the host, port and service are correct. These are the default values for the Oracle XE installed on your local computer. In this case also set sys.disableFetchGroups=true.

Due to license restrictions, the jdbc driver for Oracle database is NOT shipped with DNet. You must download it separately from Oracle website. Go to http://www.oracle.com/technetwork/indexes/downloads/index.html look for `JDBC Drivers` and select the version you want: `Oracle Database 11g Release 2` or `Oracle Database 11g Release 1`. Choose either ojdbc6.jar or ojdbc5.jar Moreover, Oracle doesn't provide an osgi ready version of their jdbc so you'll have to do this conversion yourself. There are different ways to do this, here is presented one simple approach which works fine:

  • Go to http://www.aqute.biz/Bnd/Download , download biz.aQute.bnd.jar and rename it to something simple for example bnd.jar
  • Open a command window, navigate to the location where you saved the ojdbc6.jar and execute the following:
    java -jar bnd.jar wrap ojdbc6.jar
    In case of an error like 'java is not recognized ...' add the location of $JAVA_HOME/bin folder to your PATH environment variable. Please check the java documentation. As a result of this step you should get a new file: ojdbc6.bar
  • Copy the new file to VIRGO_HOME/repository/usr and replace the .bar extension with .jar

Other database

Ensure you have the database engine installed and started.

Create the database user and schema. Open net.nan21.dnet.properties file and comment the existing database configuration and add the properties for the new database under DATABASE CONFIGURATION section setting the values accordingly:

	jdbc.driverClassName=...
	jdbc.url=...
	jdbc.username=...
	jdbc.password=...
			

Download the jdbc driver for your database (ensure it is the osgi enabled version) and copy it under VIRGO_HOME/repository/usr

Static content provider

The Extjs based user interfaces are static resources, plain javascript files, images, css files, etc. These may be deployed under a different web-server which provides only static content.

There are three main parts which may be configured to be served by such a static content provider:

  • The Extjs library itself
  • DNet-Core extjs user interface elements
  • DNet-Modules extjs user interface elements

Open net.nan21.dnet.properties file and under WEB-UI CONFIGURATION section configure the parameters to point to the desired locations. Ensure that the desired content is published by that web server. Below are some examples on how to do this with Apache Http server.

Example 3.1. DNet-Core extjs user interface elements

Extract the content of nan21.dnet.core.ui.extjs.jar ( You may use 7zip for this ) in a location let's say C:/dnet/static_content/nan21.dnet.core.ui.extjs Open httpd.conf and create an alias after the DocumentRoot parameter
Alias /nan21.dnet.core.ui.extjs "C:\dnet\static_content\nan21.dnet.core.ui.extjs\src\main\webapp"
In net.nan21.dnet.properties set the following:
url.ui.extjs.core=http://localhost/nan21.dnet.core.ui.extjs

Example 3.2. DNet-Modules extjs user interface elements

For the modules extjs user interface is all or nothing, all of the modules static content is retrieved from the same url. Extract the content of ALL of the nan21.dnet.module.XX.ui.extjs.jar bundles ( You may use 7zip for this ) in a location let's say C:/dnet/static_content/nan21.dnet.module.XX.ui.extjs Open httpd.conf and create an alias after the DocumentRoot parameter for each of the modules as the following:
Alias /nan21.dnet.module.XX.ui.extjs "C:\dnet\static_content\nan21.dnet.module.XX.ui.extjs\src\main\webapp"
In net.nan21.dnet.properties set the following:
url.ui.extjs=http://localhost
Thus the url for the module's extjs scripts will be http://localhost/nan21.dnet.module.XX.ui.extjs