Introduction

This user manual is to help you maintain, update and use the relevant application easily and quickly. You’ll find detailed screenshots, explanations and instructions on how to manage your application.

Version 1.0.0.Draft

aripd.com

Installation

Prerequisites

Install

Debian operating system is pre-installed. To update and upgrade it

# update the list of available packages and their versions, it does not install or upgrade any packages.
$ apt-get update
# install newer versions of the installed packages
$ apt-get upgrade

To install Java

# install jdk
$ apt-get install default-jdk
# check version
$ java -version

To download and install Glassfish

# Download Glassfish
$ wget http://download.oracle.com/glassfish/5.0.1/nightly/latest-glassfish.zip
# Unzip Glassfish
$ apt-get install unzip
$ unzip latest-glassfish.zip -d /opt

To install MySQL

# Install MySQL
$ apt-get install mysql-server
# Improve MySQL installation security
$ mysql_secure_installation
# check version
$ mysql --version

To download and install MySQL Connector/J

# Download MySQL Connector/J and copy it to Glassfish external libraries directory
$ wget http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.46/mysql-connector-java-5.1.46.jar -P /opt/glassfish5/glassfish/lib/

To install the application

# Clone the application
$ apt-get install git
$ git clone https://bitbucket.org/aripd/aset.git

# Compile the application
$ cd aset
$ apt-get install maven
$ maven clean install

Setup

Set server time as GMT for the UK. Check out World Clock / Converter

Create MySQL database and user

$ mysql
mysql> CREATE DATABASE aset CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER aset@localhost IDENTIFIED BY 'P@ssword1';
mysql> GRANT ALL PRIVILEGES ON aset.* TO aset@localhost;
mysql> FLUSH PRIVILEGES;

Create MySQL tables if initial sql file is ready

$ mysql -u aset -p aset < /path/to/aset.sql

Drop MySQL tables if database is not empty

mysql> USE aset;
mysql> DROP TABLE IF EXIST products_recommendeds;
mysql> DROP TABLE IF EXIST FORMULAENTITY;
mysql> DROP TABLE IF EXIST PROPOSALITEMENTITY;
mysql> DROP TABLE IF EXIST PROPOSALENTITY;
mysql> DROP TABLE IF EXIST PRODUCTENTITY;
mysql> DROP TABLE IF EXIST USERENTITY;

Prepare the init script for Glassfish

$ wget http://aripd.com/files/setup/glassfish -P /etc/init.d/
# Make the script executable
$ chmod a+x /etc/init.d/glassfish
# Make the Glassfish server to start on boot up
$ update-rc.d glassfish defaults

Edit domain.xml to change port and application context root

$ nano /opt/glassfish5/glassfish/domains/domain1/config/domain.xml

Find http-listener-1 and change the value from 8080 to 80

<network-listener protocol="http-listener-1" port="8080"

Find context-root and change the value to “/aset” or “/”

<application context-root="/aset"

You can now start Glassfish

$ /etc/init.d/glassfish start

Define resources to Glassfish using asadmin tool

  • Create a JDBC resource with the specified JNDI name

    $ asadmin> help create-jdbc-resource for help

      $ asadmin> create-jdbc-resource --connectionpoolid aset_pool --enabled=true jdbc/aset
      Command create-jdbc-resource executed successfully.
    
  • Register a JDBC connection pool

    $ asadmin> help create-jdbc-connection-pool for help

      $ asadmin> create-jdbc-connection-pool
      --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlXADataSource --restype javax.sql.XADataSource
      --property portNumber=3306:password=P@ssword1:user=aset:serverName=localhost:databaseName=aset:connectionAttributes=\;create\\=true aset_pool
      Command create-jdbc-connection-pool executed successfully.
    

Add the named authentication realm to Glassfish using asadmin tool

$ asadmin> help create-auth-realm for help

$ asadmin> create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm --property jaas-context="jdbcRealm":datasource-jndi="jdbc/aset":user-table="USERENTITY":user-name-column="EMAIL":password-column="PASSWORD":group-table="USERENTITY":group-name-column="USERGROUP":digest-algorithm="none":digestrealm-password-enc-algorithm="none" "jdbcaset"

Support

Supporting Languages

Currently we support two languages. Default one is English GB. For further languages support please contact with us.

  • English GB (default)
  • Türkçe TR
  • Español ES
  • Français FR
  • Pусский RU

Technologies

Below are core technologies that we use for this project.

  • Operating System: Debian, CentOS
  • Development Platform: Java Enterprise Edition
  • User Interface Framework: Java Server Faces
  • Deployment Server: Oracle Glassfish
  • Database Compatibility: MySQL, MariaDB
  • Reporting Engine: JasperReports

Reports

TBD

Issues

We use Atlassian Bitbucket as our issue tracker, at:

https://bitbucket.org/aripd/aset/issues