Installing nevisAdapt
The installation of the nevisAdapt service includes the following software packages:
Package name | Component | Remarks |
---|---|---|
nevisadapt-<version>.noarch.rpm | nevisAdapt service | - Contains an embedded Tomcat servlet container.- Contains the database schema. |
Install all software packages with the user "nvauser " and the group "nvbgroup". As a precondition, this user and group must exist.
File system layout
The table below describes the layout of the nevisAdapt file system:
Path | Description | Type |
---|---|---|
/opt/nevisadapt/ | Read-only base directory of the installation, owned by the user "nevisdetect" and group "nevisdetect". | Installation directory |
/opt/nevisadapt/util/util.sh | Helper script used during the post-install- and pre-remove-phase of the package. | |
/opt/nevisadapt/bin/nevisadapt-exec.jar | Executable jar file. | |
/opt/nevisadapt/bin/nevisadapt-exec.conf | Link to /var/opt/nevisadapt/conf/nevisadapt-exec.conf | |
/var/opt/nevisadapt/ | Read/write directory of the installation, owned by the user "nevisdetect" and group "nevisdetect". | Spool directory |
/var/opt/nevisadapt/logs/nevisadapt.log | Log file(s). | |
/var/opt/nevisadapt/logs/nevisadapt.stdout | The system redirects stdout to this file. | |
/var/opt/nevisadapt/conf/nevisadapt.properties | nevisAdapt service configuration file. | |
/var/opt/nevisadapt/conf/riskscore-mapping.properties | Configuration file for the risk score mapping. | |
/var/opt/nevisadapt/conf/nevisadapt-exec.conf | Configuration file for the init.d service. | |
/var/opt/nevisadapt/conf/logback.xml | logback configuration file. | |
/var/opt/nevisadapt/conf/role-to-permission.properties | Role-to-permission mapping file. |
Database schema
After the installation of nevisAdapt, it is possible to manually create and maintain the database schema, for example with Flyway, an open source database migration tool. See the sample command below:
[root@nevisdetect-dev rpm]# /opt/nevisadapt/flyway/bin/flyway.sh info
Flyway 4.1.2 by Boxfuse
Database: jdbc:oracle:thin:@oravml11.zh.adnovum.ch:41010:DCHNEV01 (Oracle 11.2)
+---------+-------------------+---------------------+---------+
| Version | Description | Installed on | State |
+---------+-------------------+---------------------+---------+
| 1 | nevisAdapt Schema | 2019-01-23 10:48:05 | Success |
+---------+-------------------+---------------------+---------+
By default, nevisAdapt uses the database connection configured in the file /var/opt/nevisadapt/conf/nevisadapt.properties
. However, you can also configure the parameters with the command line. Flyway supports the following commands:
Name | Description |
---|---|
migrate | Migrates the database. |
clean | Drops all objects in the configured schemas. |
info | Prints the details and status information about all the migrations. |
validate | Validates the applied migrations against the ones available on the classpath. |
baseline | Baselines an existing database, excluding all migrations up to and including the baseline version. |
repair | Repairs the schema history table. |
Supported databases
nevisAdapt supports the following databases:
- Oracle
- MariaDB
To load the data types for the Flyway script, perform the following steps:
- Determine the database vendor from the JDBC URL (it should contain either the string
jdbc:oracle
orjdbc:mysql
). - Depending on the database vendor, load the data types for the Flyway script either from the
flyway_oracle.properties
file or theflyway_mariadb.properties
file.
If you use MariaDB, you need to set the attribute lower_case_table_names
to "1" in the MySQL settings (my.cnf
file).
Software package installation - nevisAdapt service
To install the nevisAdapt service
, proceed with the next steps.
The installation of the nevisAdapt plug-in is described further below.
- Execute the following command to install the component's software package:
rpm -i nevisadapt-<version>.noarch.rpm
During the installation, the following happens:
- Registration of the component as
init.d
service with the name nevisadapt. - Creation of the spool directory structure (if not already existing).
- Extraction of the following files from the file
/opt/nevisadapt/bin/nevisadapt-exec.jar:
/var/opt/nevisadapt/conf.properties
/var/opt/nevisadapt/conf/nevisadapt-exec.conf
/var/opt/nevisadapt/conf/logback.xml
- Administer the component with the following commands:
service nevisadapt start
service nevisadapt status
service nevisadapt stop
service nevisadapt restart
The configuration of the runtime environment of a service is located in the file nevisadapt-exec.conf
.
The following sample code block illustrates the installation of the nevisAdapt service:
# variables used by the exec /opt/nevisadapt/bin/nevisadapt-exec.jar used by init.d
APP_NAME=nevisadapt
JAVA_OPTS="-Xmx1024M -XX:+UseConcMarkSweepGC -Dlogback.configurationFile=/var/opt/nevisadapt/conf/logback.xml"
LOG_FOLDER=/var/opt/nevisadapt/logs
LOG_FILENAME=nevisadapt.stdout
# variables used by the application i.e. logback and spring
export NEVISADAPT_SPOOL_DIR=/var/opt/nevisadapt
export NEVISADAPT_APP_NAME=nevisadapt
Software package de-installation
To de-install the nevisAdapt component, run the following command:
rpm -e nevisadapt-<version>.noarch
During the de-installation, the service is stopped and de-registered. The spool directory is not modified, so a subsequent installation will have the same configuration.
Installing the nevisAdapt plug-in
The installation of the nevisAdapt plug-in is similar to the installation of the other nevisDetect risk plug-ins. For more information about the installation of risk plug-ins in nevisDetect, have a look at the nevisDetect Reference Guide, chapter Installation of nevisDetect Core.