BiblioteQ Administrator Guide

Introduction

	This document details the installation, configuration, and removal of BiblioteQ.

1. PostgreSQL Database Configuration

	1.1 Database Configuration

	BiblioteQ supports PostgreSQL 8.x, 9.x, and newer. Please follow the PostgreSQL-provided documentation for installing PostgreSQL. After installing the required PostgreSQL packages, please perform the following operations:
a) Create the xbook_db database via createdb xbook_db -E UTF8 or via the PostgreSQL-recommended procedure. Please note that xbook_db is only a suggestion.
b) Execute createlang plpgsql -d xbook_db or the PostgreSQL-recommended procedure for adding a new programming language to the xbook_db database.
c) If desired, replace all instances of the default administrator xbook_admin in postgresql_create_schema.sql file.
d) Log into your PostgreSQL xbook_db database and load the postgresql_create_schema.sql file via \i postgresql_create_schema.sql.
e) Please remember to set a new password for the xbook_admin account.

	1.2 Database Updates

	It is sometimes necessary to update a database schema after a software update. To do so, please execute the version-specific SQL statements that are located in postgresql_update_schema.sql. You may also be required to execute additional steps via BiblioteQ. Please read and follow the version-specific instructions listed at http://biblioteq.sourceforge.net/release_notes.html.

2. BiblioteQ Installation

	2.1 OS X Installation

	Please copy the contents of the OS X bundle to the desired folder. You may be required to copy biblioteq.conf to /.

	2.2 Unix Installation

	Installing BiblioteQ on platforms that lack prepared bundles involves several operations. First, please 	resolve the following software prerequisites:
a) Qt 4.8.x must be installed. Qt 5.x is also supported. Qt 4.7.4 is loosely supported. Please download Qt from https://www.qt.io/download. You have the option of building Qt with the PostgreSQL driver or creating the driver separately as a plugin.
b) YAZ 4.2.x, or higher, must be installed. Please download the software from http://www.indexdata.com/yaz.
c) If you intend to use PostgreSQL, the PostgreSQL database package must be installed. Please download the software from https://www.postgresql.org/download.
d) If you intend to use SQLite, the SQLite package must be installed. Please download the software from https://www.sqlite.org/download.html.
e) After the required dependencies have been fulfilled and your environment is properly configured for Qt, build BiblioteQ via qmake -o Makefile biblioteq.pro && make. Some systems provide gmake, qmake-qt4, and qmake-qt5.

	2.3 Windows Installation

	Windows users are urged to download the appropriate bundle. The bundle contains BiblioteQ.exe as well as an assortment of dependencies.

3. Configuring BiblioteQ

	Configuring the runtime environment of BiblioteQ is relatively simple. Bundled with the software is the biblioteq.conf file. After BiblioteQ has been installed, please review the biblioteq.conf file. If necessary, please modify it to suit your preferences.

4. Removing BiblioteQ

	4.1 OS X

	Remove the /Applications/BiblioteQ.d directory. You may also wish to remove the configuration directory (~/.biblioteq).

	4.2 Unix

	Remove the /usr/local/biblioteq directory. You may also wish to remove the configuration directory (~/.biblioteq).

	4.3 Windows

	Remove the BiblioteQ folder.

5. PostgreSQL Database Preparation

	The pg_hba.conf and postgresql.conf files must be modified. The location of these files varies. Please restart the database service after modifying the files.

	Example pg_hba.conf:

	host	 xbook_db	 all		 192.168.178.0/24	 md5
	hostssl	 xbook_db	 all		 192.168.178.0/24	 md5

	Example postgresql.conf:

	listen_addresses = '192.168.178.1, localhost'

6. PostgreSQL Database Removal

	The script postgresql_destroy_schema.sql may be used to remove the original database xbook_db and other objects created by the postgresql_create_schema.sql script.

	6.1 OS X and Unix

	The dropdb command may be used to remove a PostgreSQL database. The dropuser command may be used to remove PostgreSQL users. If available, pgAdmin may also be used.

	6.2 Windows

	Please use pgAdmin.

7. SQLite Database Removal

	Delete the desired SQLite database file(s).
