Index  Up  <<  >>  


MiniVend built-in database support

If you specify one of the first 6 types, the database will automatically be built in the default MiniVend DB style. You can specify the type with DB_FILE, GDBM, or MEMORY if you want to vary from that default. They will coexist just fine with an unlimited number of DBI databases of different types.

In addition to the database, the session files will be kept in the default format, and are affected by the actions below.

The order of preference is:

GDBM
This uses the Perl GDBM_File module to build a GDBM database. You can see if GDBM is in your perl with the command:

    perl -e 'require GDBM_File and print "I have GDBM.\n"'

Installing GDBM_File requires rebuilding Perl after obtaining the GNU GDBM package, and is beyond the scope of this forum. Linux will typically have this by default -- most other operating systems will need to specifically build this in.

DB_File (Berkeley DB)
This uses the DB_File module to build a Berkeley DB (hash) database. You can see if DB_File is in your perl with the command:

    perl -e 'require DB_File and print "I have Berkeley DB.\n"'

Installing DB_File requires rebuilding Perl after obtaining the Berkeley DB package, and is beyond the scope of this document. BSDI, FreeBSD, and Linux will typically have it by default -- most other operating systems will need to specifically build this in.

If you wish to use DB_File even though you have GDBM_File in your Perl, you must set the environment variable MINIVEND_DBFILE to a true (non-zero, non-blank) value:

    # csh or tcsh
    setenv MINIVEND_DBFILE 1

    # sh, bash, or ksh
    MINIVEND_DBFILE=1 ; export MINIVEND_DBFILE

Then re-start the server.

Or you can specify the DB_FILE class in catalog.cfg:

    Database arbitrary  DB_FILE  1

In-memory
This uses Perl hashes to store the data directly in memory. Every time you restart the MiniVend server, it will re-import all in-memory databases for every catalog.

If you wish to use this despite the presence of GDBM_File or DB_File, set the environment variable MINIVEND_NODBM as above or specify the memory type in the Database directive:

    Database arbitrary  MEMORY  1


Index  Up  <<  >>