3 Installing DIVAnet

Before Installing

  • DIVAnet is a distributed application, meaning that it is often installed on multiple systems. Refer to Chapter 2 to understand what systems and servers DIVAnet should be installed on, and what particular DIVAnet services should be installed.

  • Each DIVArchive site connected to DIVAnet must be running DIVArchive 7.3.1 or later.

  • DIVAnet can be installed on 64-bit Windows platforms, or 64-bit Oracle Linux platforms (release 7 or later). DIVAnet can be installed either in the same home directory as DIVArchive, or in its own directory.

  • On Windows computers the DIVAnet installer requires administrator privileges. On Linux computers the DIVAnet installer requires the user named diva.

  • By default, the DIVAnet installer handles the installation of the DIVAnet services files, the DIVAnetUI, and a compatible 64-bit Java 8 Java Runtime Environment (JRE). DIVAnet uses the installed JRE for execution. Installing the DIVAnet database requires an Oracle Database 11g release 2 or later (Oracle 12c recommended). Oracle SQLPlus (Oracle 11 or later client software) must be installed directly on the DIVAnet system.

  • If you are reinstalling DIVAnet, make sure the DIVAnet components are not running.

  • If a DIVAnet database is installed, you must run the upgradeDb script (see Upgrading DIVAnet) to upgrade the database to the latest release.

Installing DIVAnet Software

DIVAnet can be installed on either Windows or Oracle Linux 7 operating systems. The following subsections describe the installation on each platform.

DIVAnet Windows Installation

Use the following procedure to install DIVAnet in a Windows environment:

  1. Launch the DIVAnet installer executable, DIVAnet_V2.2.version.exe using an account with administrator privileges.

  2. Select the desired components, and then click Next.

    • Select Java if you have not previously installed in the target directory.

    • If you only want to install the DIVAnet user interface, deselect DIVAnet Services.

  3. Specify a target installation directory. This will be the DIVAnet home directory. Then, click Install.

    Note:

    You can use the DIVArchive installation directory as the DIVAnet home directory. However, Oracle recommends installing DIVAnet in its own directory.

Oracle Linux DIVAnet Installation

If you run on Linux, you must create a user named diva and a user named divanetsvc. The divanetsvc user must have permissions to write, read, and execute files owned by diva. The diva user must have sudo privileges for the Linux systemctl command. You must run the installation as the diva user, an admin user, or root. You must create the diva user before installing the software. An option is provided in the installer to create the diva and divanetsvc users before installation.

Use the following procedure to install DIVAnet in a Linux environment:

  1. Open a terminal session and navigate to the parent directory for the DIVAnet release.

  2. Place the DIVAnet installation package (for example, DIVAnet-2.2-RELEASE.sh) in the directory. The installer enables DIVAnet to be installed in a child subdirectory of this parent directory.

  3. Start the DIVAnet installation using the following command:

    sh ./DIVAnet-2.2-RELEASE.sh

    The install wizard provides an option to create the prerequisite diva and divanetsvc Linux users before installing the software. These users do not need to be recreated if they already exist and are assigned the correct permissions.

    The installation will not continue if the users do not exist. If the users already exist, or after you create them, select the option to install the DIVAnet software.

  4. When prompted for the installation directory, press Enter to use the default subdirectory named DIVAnet, or specify a custom subdirectory name and then press Enter to create the installation directory.

    The DIVAnet install process begins, and all files and folders are extracted into the specified target directory.

The following sections describe additional steps you may need to take to complete the installation. See Chapter 2 for more information.

Creating the DIVAnet Database

To create the DIVAnet database, you first create the DIVAnet Oracle database user and tables, and then configure the DIVArchive sites.

Creating the Tables

This step involves creating the DIVAnet database tables that will exist on a running Oracle server. This step is required only for a full DIVAnet install (see Chapter 2).

Create the DIVAnet Database Schema

To run the SQL creation scripts, you must have SQLPlus (Oracle 11g or later client software) installed on the system you are installing DIVAnet on. Insure that the path to the sqlplus utility is in the PATH environment variable on your system.

  1. Open a command line window or terminal shell. Change directory to the DIVAnet home directory (the directory where DIVAnet is installed).

  2. Change directory to Program/Database/divanet/Install.

  3. Run the following command:

    Windows:

    create_divanet_user.bat {sys_password} {user_name} {user_password} {oracle_tns_name}

    Linux:

    create_divanet_user.sh {sys_password} {user_name} {user_password} {oracle_tns_name}

    In the previous command, syspassword is the Oracle system password, user_name is the Oracle user name/schema name that will contain the DIVAnet tables, and oracle_tns_name is the Oracle TNS Name for the DIVAnet database you want to use for installation. If there is no TNS Name defined for the database, you can refer to the following section to create a TNS Name real-time.

Deleting the DIVAnet Database Schema

To delete the DIVAnet database schema, execute the following steps.

Caution:

This will delete all data in the DIVAnet database.
  1. Change directory to Program/Database/divanet/Install.

  2. Run the following command:

    Windows:

    delete_divanet_user.bat {sys_password} {user_name} {oracle_conn_string}
    

    Linux:

    delete_divanet_user.sh {sys_password} {user_name} {oracle_conn_string}
    

    In the previous command, syspassword is the Oracle system password, user_name is the Oracle user name or schema name that will contain the DIVAnet tables, and oracle_conn_string is either the Oracle TNS Name for the DIVAnet database you want to use, or the Oracle Connection String (see the following section) for installation. If there is no TNS Name defined for the database, refer to the following section to create an Oracle connection string for use in the add and delete scripts.

Oracle Connection String

If you do not have a TNS Name defined for your database, you can supply an Oracle connection string. The format for this string is the following:

netaddress:port/remote_servicename

Where:

  • netaddress: Network Address where the database runs

  • port: Port where clients can connect

  • remote_servicename: The Oracle remote service name. This is different from the service name used locally. The default for the DIVA Oracle database installation package is lib5.world. An example full connection string is 183.34.34.67:1521/lib5.world.

Adding Sites

After the DIVAnet tables are created, you must configure the DIVA sites in the DIVAnet database. Run the addSites script to configure the sites in the database as follows:

  1. Change to the DIVAnet home directory, and then navigate to the Program/divanet/bin subfolder.

  2. Run the addSites script:

    Windows: addSites.bat

    Linux: addSites.sh

    This script will walk you through adding sitename records and configuring sitenames, locations, and comments. The network connections to the sites are configured in the ClientAdapter configuration file (see Chapter 4). You should create sitenames that are easy to read and reflect either the physical location, or the function of the site.

    Note:

    The sitenames you provide in this step will be used when configuring both local and remote DIVAnet services. Ensure the desired sitenames are consistent and agreed upon before running the addSites script. If you make a mistake while running the command, you can logically delete the site from within the addSites script. After the sitenames are in the database, DIVAnet installation can proceed.

Configuring the DIVAnet Configuration Files

Refer to Chapter 2 to determine which DIVAnet services need to be configured, and then refer to Chapter 4 for details on how to configure each service.

Underneath the DIVAnet home directory, in the Program/conf/divanet/templates subdirectory, there are template configuration files for each of the DIVAnet services that need to be configured. Each template file has a .ini extension. You should take each file and copy it to the parent directory (in this case, Program/conf/divanet). When you copy each file, make sure to remove the .ini extension.

At the top of each .ini file, there is documentation of the parameters available. For each DIVAnet site, configure a ManagerAdapterConfig.xml. For a full DIVAnet installation, you also configure the ClientAdapterConfig.xml and DBSyncConfig.xml files.

Many of the parameters can be left at their default value. You should not have to change any of the configuration files in the Program/conf/divanet/wrapper folder. You may optionally add information to the divaEnv.conf file (see Adding Script Variables to a Configuration File for more information).

Note:

If after reading this documentation you are unclear on what parameters should be modified from their defaults, contact Oracle Support.

Installing and Starting DIVAnet Services

See Chapter 2 to determine what services need to be installed and configured.

After the configuration files have been set up properly, install and start the DIVAnet services. Perform each step for every service to be installed at each DIVAnet site.

Installing DIVAnet Windows Services

Use the following procedure to install DIVAnet services in the windows environment:

  1. Change to the DIVAnet home directory (where DIVAnet is installed).

  2. Navigate to the Program/divanet/bin folder.

  3. Run the InstallDivanetService.bat script, providing the wrapper configuration file for the service being installed. For example, to install the ManagerAdapter Service (required at all sites where a Manager to be connected to DIVAnet is running), run the following command:

    InstallDivanetService.bat ../../conf/divanet/wrapper/ManagerAdapterWrapper.conf
    
    • For the ClientAdapter Service, use the same command and same path, but substitute ClientAdapterWrapper.conf as the file name.

    • For the DbSync Service, use the file name DBSyncWrapper.conf.

  4. In the Windows Services window, you should see one or more of the following DIVAnet services:

    • Divanet ManagerAdapter

    • Divanet ClientAdapter

    • Divanet DbSync

    The services can be started in any order, but keep in mind that after the DbSync Service and the ManagerAdapter Services are both started, the database syncing process will start automatically. Start the ClientAdapter Service to allow new DIVAnet connections and API processing.

Installing DIVAnet Linux Services

Use the following procedure to install DIVAnet services in the Linux environment:

  1. Open a terminal session and navigate to the Program/divanet/bin directory.

  2. Run the divanetservice script to install the desired service (DbSync, ClientAdapter, or ManagerAdapter). For example, to install the ClientAdapter, enter the following command:

    ./divanetservice install ClientAdapter

Managing DIVAnet Linux Services

After the Linux DIVAnet services are created you use the following commands to manage them:

Table 3-1 Linux DIVAnet Services

Operation Command

List All Services

./divanetservice list

Start a Service

./divanetservice start {service_name}

Stop a Service

./divanetservice stop {service_name}

Restart a Service

./divanetservice restart {service_name}

Install a Service

./divanetservice install {service_name}

Uninstall a Service

./divanetservice uninstall {service_name}


The service_name parameter can be DbSync, ClientAdapter, or ManagerAdapter. The DIVAnet services can also be managed using the standard Linux system V systemctl command syntax. You can enter man systemctl at the Linux command prompt for more information on the systemctl command.

Viewing Logs

The DIVAnet applications produce two main types of logs:

  • Trace Logs — Located within the DIVAnet home directory, in the Program/log/divanet subfolder. Each of the DIVAnet services (ManagerAdapter, DbSync, and ClientAdapter) create their own subfolder underneath the Program/log/divanet folder, and generate their log files in that subdirectory.

  • Wrapper Service Logs — Examine these first to make sure the applications are starting correctly. These logs are within the DIVAnet home directory in the Program/log/divanet subfolder. They will be named similar to the Wrapper.conf file, but with a .log file name extension (for example: ManagerAdapterWrapper.log).

Checking the Configuration

The most common errors in configuring DIVAnet are errors in specifying the sitenames. All DIVA sites in the DIVAnet network must use the same set of sitenames. The sitenames must be consistent in all of the configuration files, and in the DIVAnet database. The LocalSitename parameter must be correctly configured in all of the service configuration files.

You should also check the DIVArchive Source/Destination. For example, by default, if site diva1 has a Source/Destination that is named the same as one on site diva2, DIVAnet considers them as pointing to the same logical Source/Destination. If the same Source/Destination name is configured on two different DIVArchive sites, DIVAnet will assume that these Source/Destinations refer to the same place.

Syncing the DIVAnet Database

When the DbSync service is started, it will attempt to synchronize archived object information by consulting the ManagerAdapter service. The ManagerAdapter service in turn pulls asset information from the DIVArchive site to which it is connected. Therefore, you should start the DbSync service and ManagerAdapter services only when you are ready to begin synchronization.

Note:

If you stop the DbSync service, synchronization will start again where it left off when the service is restarted.

The DivanetAdmin command-line tool monitors the status of the database synchronization on a site-by-site basis. If DIVAnet is performing an initial synchronization of a particular site, it will show the percentage complete of that initial sync operation. If the site is up-to-date, DivanetAdmin will indicate that the site is In Sync.

DivanetAdmin can also be used to resynchronize a site. This involves deleting all archived object records previously synchronized from the site, and resynchronizing them from the source. This should only be used in rare circumstances, such as when the source DIVA database has been unexpectedly restored from an out-of-date database backup.

You can run the gather_schema_stats script after an initial synchronization, or resynchronization, to immediately improve performance. See the following section, Upgrading DIVAnet, for more information.

Upgrading DIVAnet

It is recommended that you back up the existing DIVAnet home directory before attempting to upgrade to a new version of DIVAnet. You must also stop any running DIVAnet services or programs on the server before attempting an upgrade. Use the following procedure to upgrade the DIVAnet software:

  1. Follow the instructions in the Installing DIVAnet Software section. This will install the latest DIVAnet software into the DIVAnet home directory.

  2. You must run the DIVAnet database upgrade utility if you are upgrading a system that contains a DIVAnet database. To run the utility, change directory to Program/divanet/bin and run the following command:

    Windows: ./upgradeDb.bat

    Linux: ./upgradeDb.sh

    The script will prompt for input about the DIVAnet database (including database user name and the network address of where the database resides). The utility will add or modify the required database objects. The script will simply return success if the database has already been upgraded to the latest release.

  3. If you are upgrading a system containing a DIVAnet Database to DIVAnet 2.2, you must run the gather_schema_stats script. This script installs a weekly job to gather statistics for the database (if needed), and then immediately gathers current statistics. The script requires the Oracle sys password. To run the script, change directory to Program/Database/divanet/Install, and execute the following:

    In Windows:

    ./gather_schema_stats.bat {divanetDbUser} {sysDbPassword} {oracleConnectionStr}
    

    In Linux:

    ./gather_schema_stats.sh {divanetDbUser} {sysDbPassword} {oracleConnectionStr}
    

    For example, in Linux execute:

    ./gather_schema_stats.sh divanet sysDbPass3 127.0.0.1:1521/lib5.world