Release Automation

Expand all | Collapse all

Nolio 4.7 - Custom Installation without Database Configuration

  • 1.  Nolio 4.7 - Custom Installation without Database Configuration

    Posted 08-05-2013 11:31 AM

    As of version 4.7, Nolio no longer automatically support MySQL database installation. This, along with other reasons why a user might not want to configure the Nolio database upon installation, makes it necessary to manually perform some changes post-installation in order to create the Nolio database.

     

    1. During the installation, choose to custom install Nolio and tick the "Skip Database Configuration" box.

     

    2. In case this is a MySQL database: Retrieve a file named "mysql-connector-java-x.x.xx.jar" (where the x's stand for version number). This file can either be downloaded online from MySQL's website (search for "mysql connector java"), or it can be retrieved from your computer's MySQL folder (under a folder named "Connector J [version number]"). Copy this file to the following 2 folders in your Nolio installation directory:
    [Nolio Root Directory]\lib\
    And:
    [Nolio Root Directory]\webapps\datamanagement\WEB-INF\lib\

     

    3. Update the "database.properties", "distributed.properties" and "hibernate.cfg.xml" files as follows (these instructions are also found in the Installation and Administration guide):

     

    Update "hibernate.cfg.xml" file located in [Nolio Root Directory]\webapps\datamanagement\WEB-INF\ as follows: Replace "property name="hibernate.hbm2ddl.auto" value from "update" to "create".

     

    Update "database.properties" file located in [Nolio Root Directory]\webapps\datamanagement\WEB-INF\ to make sure your DB type (MySQL / MSSQL / Oracle) "Settings" section is uncommented, while all the rest are commented out.

     

    Update "distributed.properites" file located in [Nolio Root Directory]\webapps\datamanagement\WEB-INF\ as follows:

     

    # Database props data.management.database.host = < HOSTNAME OR IP OF THE DATABASE MACHINE >
    Enable Support for MySQL as System Database
    46 Installation and Administration Guide
    data.management.database.port = < MYSQL LISTENER PORT. DEFAULT IS 3306 >
    data.management.database.name = < NAME OF THE DATABASE CREATED >
    data.management.database.user = < DATABASE USERNAME >
    # The DB password shall be encrypted. Please use the encrypt_password.bat/sh utility to encrypt the password.
    data.management.database.pwd = < DATABASE USER PASSWORD >
    data.management.database.create = false

     

    4. Create a database/schema with your chosen database name (default: nolio_db).

     

    5. Update the file [Nolio Root Directory]\conf\context.xml according to these instruction (you may have to either edit or add this section to the "context.xml" file):

     

    For MySQL:


    <Manager maxIdleBackup="1" maxIdleSwap="0" minIdelSwap="0" saveOnRestart="true" className="org.apache.catalina.session.PersistentManager">
            <Store className="org.apache.catalina.session.JDBCStore" sessionAppCol="app_name"
                   sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive"
                   sessionValidCol="valid_session" sessionDataCol="session_data" sessionIdCol="session_id"
                   sessionTable="sessions"
                   connectionName="<DB ASSIGNED USER>" connectionPassword="<DB USER PASSWORD>" connectionURL="jdbc:mysql://<MYSQL SERVER NAME>:<PORT>/<DB NAME>"
                   driverName="com.mysql.jdbc.Driver"/>
    </Manager>

     

     

    For MSSQL:


    <Manager maxIdleBackup="1" maxIdleSwap="0" minIdelSwap="0" saveOnRestart="true" className="org.apache.catalina.session.PersistentManager">
            <Store className="org.apache.catalina.session.JDBCStore" sessionAppCol="app_name"
                   sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive"
                   sessionValidCol="valid_session" sessionDataCol="session_data" sessionIdCol="session_id"
                   sessionTable="sessions"
                   connectionName="<DB ASSIGNED USER>" connectionPassword="<DB USER PASSWORD>" connectionURL="jdbc:sqlserver://<MS SQL SERVER NAME>:<PORT>;databaseName=<DB NAME>"
                   driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    </Manager>

     

     

    For Oracle:


    <Manager maxIdleBackup="1" maxIdleSwap="0" minIdelSwap="0" saveOnRestart="true" className="org.apache.catalina.session.PersistentManager">
            <Store className="org.apache.catalina.session.JDBCStore" sessionAppCol="app_name"
                   sessionLastAccessedCol="last_access" sessionMaxInactiveCol="max_inactive"
                   sessionValidCol="valid_session" sessionDataCol="session_data" sessionIdCol="session_id"
                   sessionTable="sessions"
                   connectionName="<DB ASSIGNED USER>" connectionPassword="<DB USER PASSWORD>" connectionURL="jdbc:oracle:thin@://<ORACLE SERVER NAME>:<PORT>/<DB NAME>"
                   driverName="oracle.jdbc.driver.OracleDriver"/>
    </Manager>

     

     

    6. Locate and execute the following SQL script:

     

    For MySQL: [Nolio Root Directory]\scripts\sessions_mysql.sql
    For MS SQL: [Nolio Root Directory]\scripts\sessions_mssql.sql
    For Oracle: [Nolio Root Directory]\scripts\sessions_oracle.sql

     

    7. Start Nolio Server.

     

    8. Once Nolio is started correctly, update the "hibernate.cfg.xml" configuration file back to the way it was originally (switch back from "create" to "update").

     

    Your Nolio server is now up and running with the database configured properly.



  • 2.  Re: Official Nolio KB: Nolio 4.7 - Custom Installation without Database Configu

    Broadcom Employee
    Posted 09-17-2014 05:50 PM

    If I may add a few suggestions (I saw this question raised again today):

    • Could this be updated to include version 5.0.x?  As of this writing, this solution also applies to 5.0.1.
    • Can the title be shortened?  It appears "Configuration" was truncated in the title.
    • Might be worth adding the following: After performing these steps, one can run encrypt_password.bat in the /scripts folder to ensure passwords set in the configuration file are encrypted.
    • Database tables are created during the Automation Manager startup, so after this completes, one will need to configure it to not recreate at the next startup.