19.0 Database Configuration > Configuring SQLite3

Conventions

19.1 SQLite3

Moab supports connecting to a database via native SQLite3. Database installation and configuration occurs automatically during normal Moab installation (configure, make install). If you did not follow the normal process to install Moab and need to install the database, do the following to manually install and configure Moab database support:

  1. Create the database file moab.db in your moab home directory by running the following command from the root of your unzipped Moab build directory:
    perl buildutils/install.sqlite3.pl ‹moab-home-directory›
    • Verify that the command worked by running lib/sqlite3 ‹moab-home-directory›/moab.db; at the resulting prompt, type .tables and press ENTER. You should see several tables such as mcheckpoint listed. Exit from this program with the .quit command.
    • The perl buildutils/install.sqlite3.pl ‹moab-home-directory› command may fail if your operating system cannot find the SQLite3 libraries. Also, Moab fails if unable to identify the libraries. To temporarily force the libraries to be found, run the following command:
      export LD_LIBRARY_PATH=‹location where libraries were copied›
  2. In the moab.cfg file in the etc/ folder of the home directory, add the following line:
    USEDATABASE  INTERNAL		

To verify that Moab is running with SQLite3 support, start Moab and run the mdiag -S -v command. If there are no database-related error messages displayed, then Moab should be successfully connected to a database.

> moabd is a safe and recommended method of starting Moab if things are not installed in their default locations.