This step is necessary for all platforms. You have to create some databases for refdb to start with and you should make the refdb SGML/XML support files known to your system.
The refdb database contains common information that is shared by all reference databases.
Note: If mysqld (the MySQL database server) is installed on a remote box or if the security settings require it, you may have to use the -h hostname and/or the -u username/-p password options to run the mysql client as shown below (most fresh MySQL installations use "root" with no password as the default database administrator). mysqld needs to be up and running and you need the appropriate permissions, of course. See the MySQL documentation for further details.
In a command line window, run the following command to create the database "refdb1":
~$ mysql -u root -e "CREATE DATABASE refdb" |
Then run this command to create the tables and fill in the data:
~$ mysql -u root refdb < /usr/local/share/refdb/sql/refdb.dump |
Adapt the path to the script accordingly if you configured refdb to put the data directory somewhere else.
Note: If postmaster (the PostgreSQL database server) is installed on a remote box or if the security settings require it, you may have to use the -h hostname and/or the -U username options to run the psql client as shown below (most fresh PostgreSQL installations on Unix-style systems use "pgsql" with no password as the default database administrator. The Cygwin port of PostgreSQL uses the name of whoever installed the package, usually "Administrator"). postmaster needs to be up and running and you need the appropriate permissions, of course. See the PostgreSQL documentation for further details.
In a command line window, run the command:
~$ createdb -U pgsql -E UNICODE refdb |
The data that you will import in the following steps are UTF-8 data. If you wish to use a different encoding, convert the dump file and adapt the above command accordingly.
Then run this command:
~$ psql -U pgsql refdb1 < /usr/local/share/refdb/sql/refdb.dump.pgsql |
Adapt the path to the script accordingly if you configured refdb to put the data directory somewhere else. This SQL script will generate the necessary table definitions and fill in a few values. PostgreSQL will notice you that it is going to truncate a few identifier names. It is safe to ignore these messages.
The default database directory is /usr/local/share/refdb/db. refdb will look here unless you selected a different data directory when configuring the application. If you want to keep your databases somewhere else, use the dbpath variable in refdbdrc and modify the following instructions accordingly.
~$ cd /usr/local/share/refdb/db |
Run the following command to create the database and load the data:
~$ sqlite refdb < /usr/local/share/refdb/sql/refdb.dump.sqlite |
Now is the time to create the global configuration files described in the configuration file section. Create these files in /usr/local/etc/refdb (or whatever you chose during configuration). It is recommended to copy and modify the commented example configuration files in the same directory. These files are installed with the suffix ".example" to avoid overwriting existing configuration files. All required paths are automatically configured during the installation, so these files are a good starting point for your local modifications.
The refdb package comes with a few additional scripts and stylesheets for the creation of bibliographies. These files are installed in the package data directory (usually /usr/local/share/refdb) and its subdirectories, but you should spend a little time to integrate them into your SGML system.
To this end, add the catalog file /usr/local/share/refdb/refdb.cat to your SGML_CATALOG_FILES environment variable. This is a master catalog with CATALOG directives for all catalog files supplied by refdb.
The refdb shell scripts (db2ris, refdbjade, runbib, refdbxml, and the Perl scripts tex2mail and marc2ris.pl) were installed in /usr/local/bin unless you chose a different install root during configure. As refdb attempts to insert the correct settings during the build process, it should not be necessary to manually customize these scripts. If you still want to fiddle with the settings, the variables are clearly marked within a "user-customizable section" at the top of each script.
Note: If you want to use a Java XSL processor with the refdbxml script, you'll have to check the value of CLASSPATH in the script. The value must match the actual location of your .jar files and the current versions you've installed.