Jump to: navigation, search

Initializing the DBMS

This section describes the how to create and initialize the LFMT database:

On Linux

Setting up the LFMT database

Purpose: To create and initialize the data model (the database structure) for the LFMT Database.

Prerequisites

  • The RDBMS (i.e. Oracle, MS-SQL or Postgres) is installed, and the service is running.

PostgreSQL

  1. If the postgres user is not already created, create it now by entering the following commands at the prompt, and press Enter after each command:
    adduser postgres
    su -postgres
  2. Navigate to the postgresql folder.
  3. Create the database called lfm by entering the following command at the prompt:
    ./bin/createdb lfm

    and press Enter.

    Warning
    • The database name of lfm is chosen as an example in this procedure for simplicity, and is used throughout these instructions.
    • You do not have to use lfm, but if you choose to use a different name, be careful to use the correct name in subsequent steps.
    • This database name is case sensitive
  4. Locate the PostgreSQL intitialization script lfmdb_XXXXX_postgres.sql from <LFMT Collector Install Directory>\utilities\dbscripts directory.
  5. Enter the command ./bin/psql -d lfm, and press Enter. This creates the tables required in the LFMT Database.
  6. Initialize the LFMT database, as follows:
    1. For PostgreSQL, enter the command \i <LFMT Collector Install Directory>/utilities/dbscripts/lfmdb_XXXXX_postgres.sql.
    2. Confirm that the script has executed without errors or warnings.

Oracle

  1. Refer to the Oracle documentation to install the Oracle Database Management System on the host machine that corresponds to the Host that you want to create the Database that will be used by LFMT.
  2. Use the following SQL commands to create the users and ensure that they do not have excessive permissions:
    1. create user <username> identified by <password>;
    2. grant connect, resource to <username>;
  3. Initialize the database by executing the following script: lfmdb_XXXXX_ora.sql , available in the following folder: <LFMT Server Install Directory>/utilities/dbscripts/
  4. invoke SQLPLUS, and type @<LFMT Collector Install Directory>/utilities/dbscripts/lfmdb_XXXXX_ora.sql.

Microsoft SQL

  1. Refer to the MSSQL documentation to install the MSSQL Database Management System on the host machine that corresponds to the Host that you want to create the Database that will be used by LFMT.
  2. Initialize the database by executing the following script:
  3. lfmdb_XXXXX_mssql.sql , available in the following folder:

    <LFMT Collector Install Directory>/utilities/dbscripts/

On Windows

Setting up the LFMT database

Purpose: To create the data model (the database structure) for the LFMT Database and initialize it with base operational data. Base operational data includes the known log file types that will be retrieved by LFMT, and the associated tokens to be targeted for indexing or scrubbing for each log type.

Prerequisites

  • The DBMS is installed, and the service is running.

PostgreSQL

  1. Create a new database called lfm, as follows:
    1. From the Windows Start menu, navigate to All Programs > PostgreSQL and select pgAdmin III.
    2. In the Object browser, navigate to Server Groups > Servers and double-click PostgreSQL v.<version number> <local host>:<default port>, providing your particular version, host, and port information.
    3. Enter the password for the user postgres.
    4. Right-click Databases and select New Database.
    5. Enter the name lfm and leave the other fields blank.
    6. Click OK. A new database called lfm is created.
  2. In a separate text editor, open the lfmdb_XXXXX_postgres.sql file found in the <LFMT Collector Install Directory>\utilities\dbsripts directory.
  3. Right-click lfm and select Create Script.
  4. Initialize the LFMT database as follows:
    1. For PostgreSQL:
      1. Copy the contents of the lfmdb_XXXXX_postgres.sql file and paste it into the SQL script editor.
      2. Select Query > Execute.
      3. Confirm that the script has executed without errors or warnings, and that the database has been successfully initialized with the correct data model.
      4. When prompted to save the script, click No.


Important
  • The database name is case-sensitive.
  • In the line, change only the IP address, port, and database name information.
  • To connect to a remote database, you must modify the pg_hba.conf file, located in the data directory of your PostgreSQL installation. Open the file in a text editor, and add the following line at the end of the file: host all all 0.0.0.0/0 trust.
  • You must also ensure that the value of listen_addresses contained in the postgresql.conf file contains the IP Address of any host connecting to the LFMT database.
  • Ensure that the firewall allows this connection.
  • More information can be gathered from http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html.

Oracle

  1. Refer to the Oracle documentation to install the Oracle Database Management System on the host machine that corresponds to the Host that you want to create the Database that will be used by LFMT.
  2. Use the following SQL commands to create the users and ensure that they do not have excessive permissions:
    1. create user <username> identified by <password>;
    2. grant connect, resource to <username>;
  3. Initialize the database by executing the following script: lfmdb_XXXXX_ora.sql , available in the following folder: <LFMT Collector Install Directory>\utilities\dbscripts\
  4. invoke SQLPLUS, and type @<LFMT Server Install Directory>\utilities\dbscripts\lfmdb_XXXXX_ora.sql.

Microsoft SQL

  1. Refer to the MSSQL documentation to install the MSSQL Database Management System on the host machine that corresponds to the Host that you want to create the Database that will be used by LFMT.
  2. Initialize the database by executing the following script:
  3. lfmdb_XXXXX_mssql.sql , available in the following folder:

    <LFMT Collector Install Directory>/utilities/dbscripts/
This page was last edited on October 8, 2021, at 14:50.
Comments or questions about this documentation? Contact us for support!