1. Introduction

This manual describes the installation and update procedures for Griaule Servers for Web Applications.

Before starting, make sure some files are available on the target machine:

  • Application .war file, gbs-<app_name>-web-server-<version>.war, which is the app to be installed;
  • Apache Tomcat package, tomcats-v5.tar, which also contains the setup script setup<version>.sh.
  • Pre-Setup scripts: setup_webapps.sh and, optionally, setup_aliases.sh if you want to create Aliases.

Important

If any file is missing, contact Griaule Support Team at support@griaule.com.

To perform a new installation, follow the steps:

  1. Check if your system meets the Pre-Requisites
  2. Run the Pre-setup scripts
  3. Install the application
  4. Configure the application
  5. Verify if the application is running using the commands presented in Handling Applications

To update an application, follow the steps:

  1. Check if your system meets the new version Pre-Requisites
  2. Update the application through the presented commands
  3. Check the Configurations
  4. Verify if the application is running using the commands presented in Handling Applications

2. Pre-Requisites

See also

To learn more about the products of Griaule Biometric Suite (GBS), please refer to GBS Overview.

3. Pre-Setup

Some steps need to be performed before the installation process. This pre-setup is done using the .sh scripts provided.

Note

In all commands, remember to substitute <app_name> to the desired application name.

Tip

The <app_name> can be: mir, best, etr, cardscan, intelligence, bcc, controlpanel, smart-sense, or print.

To perform this procedure, run the pre-setup script passing the name of the application being installed:

./setup_webapps.sh <app_name>

Optionally, if you’d like to create aliases to ease application handling, run the following script:

./setup_aliases.sh <app_name>

These scripts will:

  • Create tomcat symlinks for each service
  • Update/modify tomcat server scripts
  • Add an alias to ease application handling

Note

After those steps, if Cardscan Server is being installed, go to the database configuration file and add under [mysqld]:

vim /etc/my.cnf

# CARDSCAN Required
max_allowed_packet=500M

If it is already set, skip this step.

Then, proceed to the Installation procedures.

4. Installation

Before starting the installation procedure, make sure the tomcats-v5.tar and the application .war files are available on the target machine.

Important

If any file is missing, contact Griaule Support Team at support@griaule.com.

Note

In all commands, remember to substitute <app_name> to the desired application name and <version> to the corresponding version.

Tip

The <app_name> can be: mir, best, etr, cardscan, intelligence, bcc, controlpanel, smart-sense, or print.

Step 1: Transfer and unzip the tomcats-v5.tar package in /var/lib directory.

tar -xf tomcats-v5.tar -C /var/lib

Step 2: Move the application .war file to the application home directory:

mv *.war /var/lib/tomcats/<app_name>/

Step 3: Change to the application webapps directory:

cd /var/lib/tomcats/<app_name>/webapps

Step 4: Create a symlink in webapps to the application .war file:

ln -s /var/lib/tomcats/<app_name>/gbs-<app_name>-web-server-<version>.war gbs-<app_name>-server.war

Step 5: Change directory:

cd /var/lib/

Step 6: Change the ownership of the files in the tomcats folder to the tomcat user:

chown -R tomcat:tomcat tomcats/

Then, proceed with the application Configurations.

5. Update

To update an application, proceed with the following steps:

Note

In all commands, remember to substitute <app_name> to the desired application name and <version> to the corresponding version.

Tip

The <app_name> can be: mir, best, etr, cardscan, intelligence, bcc, controlpanel, smart-sense, or print.

Step 1: Stop the application:

systemctl stop tomcat@<app_name>.service

Step 2: Remove old files:

sudo rm -rf /var/lib/tomcats/<app_name>/webapps/*

Step 3: Move the application .war file to the application home directory:

mv *.war /var/lib/tomcats/<app_name>/

Step 4: Change to the application webapps directory:

cd /var/lib/tomcats/<app_name>/webapps

Step 5: Create a symlink in webapps to the application .war file:

ln -s /var/lib/tomcats/<app_name>/gbs-<app_name>-web-server-<version>.war gbs-<app_name>-server.war

Step 6: Start the application:

systemctl start tomcat@<app_name>.service

Step 7: And run the setup:

/var/lib/tomcats/setup<version>.sh <app_name>

6. Configurations

Each component has its individual configuration. Those are presented in their respective manual (see links below).

Note

In all commands, remember to substitute <app_name> to the desired application name and <version> to the corresponding version.

Tip

The <app_name> can be: mir, best, etr, cardscan, intelligence, bcc, controlpanel, smart-sense, or print.

Step 1: Edit the config.properties file:

vim /var/lib/tomcats/<app_name>/conf/config.properties

or with alias:

etrconf
csconf
bestconf
intelconf
mirconf
bccconf
cpconf
printconf

To understand the configuration procedures, refer to each application specific configuration manual:

Note

Make sure that the <app_name>.ip and the <app_name>.port configuration parameters are correctly specified in the config.properties file.

Note

Make sure that the Connector port=<port_number> configuration parameter is correctly specified in the server.xml file. Please refer to the applications specific configuration manuals for further details.

Step 2: After the specific procedures, access MySQL as root:

mysql -u root -p

Step 3: Run the following query:

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Step 4: Exit MySQL:

exit

Step 5: Then, start the application:

systemctl start tomcat@<app_name>.service

or with alias:

<app_name> start

Step 6: Finally, if it’s the first time running the application, run the setup script:

/var/lib/tomcats/setup<version>.sh <app_name>

or with alias:

etrsetup etr
cssetup cardscan
bestsetup best
intelsetup intelligence
mirsetup mir
bccsetup bcc
cpsetup controlpanel
smartsetup smart-sense
printsetup print

Important

If installing SmartSense, make sure that ELK is also installed. For further instructions, refer to Elastic Stack (ELK) Installation Manual.

7. Handling Applications

This section shows some commands to monitor and handle Griaule services and their respective aliases.

7.1. Aliases

Aliases are short, user-defined commands that serve as replacements for longer or more complex commands. They are created to make frequently used commands more convenient to execute. When an alias is invoked, it gets replaced by the full command it represents before it is executed.

If not using the setup_aliases.sh script as described in Pre-Setup, it is possible to manually add the aliases. To do so, edit the root .bashrc file:

vim /root/.bashrc

And add the following aliases, according to the desired application:

Important

For each application setup alias, <app_name>setup, make sure to substitute <version> to the version of the setup script available in the target machine on /var/lib/tomcats/.


For example, if installing ETR and the setup script is setup2.2.sh, the alias should be:

alias etrsetup='/var/lib/tomcats/setup2.2.sh'
      ^^^                             ^^^
# ETR
alias etrstart='systemctl start tomcat@etr.service'
alias etrstop='systemctl stop tomcat@etr.service'
alias etrstatus='systemctl status tomcat@etr.service'
alias etrhome='cd /var/lib/tomcats/etr'
alias etrconf='vim /var/lib/tomcats/etr/conf/config.properties'
alias etrsetup='/var/lib/tomcats/setup<version>.sh'
alias etrlogt='journalctl -u tomcat@etr -f'
alias etrlog='journalctl -u tomcat@etr | less'

# CARDSCAN
alias csstart='systemctl start tomcat@cardscan.service'
alias csstop='systemctl stop tomcat@cardscan.service'
alias csstatus='systemctl status tomcat@cardscan.service'
alias cshome='cd /var/lib/tomcats/cardscan'
alias csconf='vim /var/lib/tomcats/cardscan/conf/config.properties'
alias cssetup='/var/lib/tomcats/setup<version>.sh'
alias cslogt='journalctl -u tomcat@cardscan -f'
alias cslog='journalctl -u tomcat@cardscan | less'

# BEST
alias beststart='systemctl start tomcat@best.service'
alias beststop='systemctl stop tomcat@best.service'
alias beststatus='systemctl status tomcat@best.service'
alias besthome='cd /var/lib/tomcats/best'
alias bestconf='vim /var/lib/tomcats/best/conf/config.properties'
alias bestsetup='/var/lib/tomcats/setup<version>.sh'
alias bestlogt='journalctl -u tomcat@best -f'
alias bestlog='journalctl -u tomcat@best | less'

# INTELLIGENCE
alias intelstart='systemctl start tomcat@intelligence.service'
alias intelstop='systemctl stop tomcat@intelligence.service'
alias intelstatus='systemctl status tomcat@intelligence.service'
alias intelhome='cd /var/lib/tomcats/intelligence'
alias intelconf='vim /var/lib/tomcats/intelligence/conf/config.properties'
alias intelsetup='/var/lib/tomcats/setup<version>.sh'
alias intellogt='journalctl -u tomcat@intelligence -f'
alias intellog='journalctl -u tomcat@intelligence | less'

# MIR
alias mirstart='systemctl start tomcat@mir.service'
alias mirstop='systemctl stop tomcat@mir.service'
alias mirstatus='systemctl status tomcat@mir.service'
alias mirhome='cd /var/lib/tomcats/mir'
alias mirconf='vim /var/lib/tomcats/mir/conf/config.properties'
alias mirsetup='/var/lib/tomcats/setup<version>.sh'
alias mirlogt='journalctl -u tomcat@mir -f'
alias mirlog='journalctl -u tomcat@mir | less'

# BCC
alias bccstart='systemctl start tomcat@bcc.service'
alias bccstop='systemctl stop tomcat@bcc.service'
alias bccstatus='systemctl status tomcat@bcc.service'
alias bcchome='cd /var/lib/tomcats/bcc'
alias bccconf='vim /var/lib/tomcats/bcc/conf/config.properties'
alias bccsetup='/var/lib/tomcats/setup<version>.sh'
alias bcclogt='journalctl -u tomcat@bcc -f'
alias bcclog='journalctl -u tomcat@bcc | less'

# CONTROL PANEL
alias cpstart='systemctl start tomcat@controlpanel.service'
alias cpstop='systemctl stop tomcat@controlpanel.service'
alias cpstatus='systemctl status tomcat@controlpanel.service'
alias cphome='cd /var/lib/tomcats/controlpanel'
alias cpconf='vim /var/lib/tomcats/controlpanel/conf/config.properties'
alias cpsetup='/var/lib/tomcats/setup<version>.sh'
alias cplogt='journalctl -u tomcat@controlpanel -f'
alias cplog='journalctl -u tomcat@controlpanel | less'

# SMARTSENSE
alias smartstart='systemctl start tomcat@smart-sense.service'
alias smartstop='systemctl stop tomcat@smart-sense.service'
alias smartstatus='systemctl status tomcat@smart-sense.service'
alias smarthome='cd /var/lib/tomcats/smart-sense'
alias smartconf='vim /var/lib/tomcats/smart-sense/conf/config.properties'
alias smartsetup='/var/lib/tomcats/setup<version>.sh'
alias smartlogt='journalctl -u tomcat@smart-sense -f'
alias smartlog='journalctl -u tomcat@smart-sense | less'

# PRINT
alias printstart='systemctl start tomcat@print.service'
alias printstop='systemctl stop tomcat@print.service'
alias printstatus='systemctl status tomcat@print.service'
alias printhome='cd /var/lib/tomcats/print'
alias printconf='vim /var/lib/tomcats/print/conf/config.properties'
alias printsetup='/var/lib/tomcats/setup.sh'
alias printlogt='journalctl -u tomcat@print -f'
alias printlog='journalctl -u tomcat@print | less'

7.2. Useful Commands

  • Start Application
systemctl start tomcat@etr.service
systemctl start tomcat@cardscan.service
systemctl start tomcat@best.service
systemctl start tomcat@intelligence.service
systemctl start tomcat@mir.service
systemctl start tomcat@bcc.service
systemctl start tomcat@controlpanel.service
systemctl start tomcat@smart-sense.service
systemctl start tomcat@print.service

or with alias:

etrstart
csstart
beststart
intelstart
mirstart
bccstart
cpstart
smartstart
printstart
  • Stop Application
systemctl stop tomcat@etr.service
systemctl stop tomcat@cardscan.service
systemctl stop tomcat@best.service
systemctl stop tomcat@intelligence.service
systemctl stop tomcat@mir.service
systemctl stop tomcat@bcc.service
systemctl stop tomcat@controlpanel.service
systemctl stop tomcat@smart-sense.service
systemctl stop tomcat@print.service

or with alias:

etrstop
csstop
beststop
intelstop
mirstop
bccstop
cpstop
smartstop
printstop
  • Check Application Status
systemctl status tomcat@etr.service
systemctl status tomcat@cardscan.service
systemctl status tomcat@best.service
systemctl status tomcat@intelligence.service
systemctl status tomcat@mir.service
systemctl status tomcat@bcc.service
systemctl status tomcat@controlpanel.service
systemctl status tomcat@smart-sense.service
systemctl status tomcat@print.service

or with alias:

etrstatus
csstatus
beststatus
intelstatus
mirstatus
bccstatus
cpstatus
smartstatus
printstatus
  • Check Application Logs
# tail log
journalctl -u tomcat@etr -f
journalctl -u tomcat@cardscan -f
journalctl -u tomcat@best -f
journalctl -u tomcat@intelligence -f
journalctl -u tomcat@mir -f
journalctl -u tomcat@bcc -f
journalctl -u tomcat@controlpanel -f
journalctl -u tomcat@smart-sense -f
journalctl -u tomcat@print -f

# full log
journalctl -u tomcat@etr | less
journalctl -u tomcat@cardscan | less
journalctl -u tomcat@best | less
journalctl -u tomcat@intelligence | less
journalctl -u tomcat@mir | less
journalctl -u tomcat@bcc | less
journalctl -u tomcat@controlpanel | less
journalctl -u tomcat@smart-sense | less
journalctl -u tomcat@print | less

or with alias:

# tail log
etrlogt
cslogt
bestlogt
intellogt
mirlogt
bcclogt
cplogt
smartlogt
printlogt

# full log
etrlog
cslog
bestlog
intellog
mirlog
bcclog
cplog
smartlog
printlog