NAME

ld-makenewdb - Utility to create a new Litigation::Database database and supporting databases

USAGE

  ld-makenewdb [ --db=DATABASE ] [ --no-defs ] [ --no-db ] [ --postgis ]

DESCRIPTION

ld-makenewdb creates a new Litigation::Database database. It must be run as root. If Litigation::Database has not been set up yet, ld-makenewdb carries out a number of initialization tasks, including:

  1. Creates a PostgreSQL role for "root" on the local PostgreSQL server. If you are not using a local server, it connects to the server using the sys_db_admin* configuration options and uses sys_db_username as the username instead of "root."
  2. Creates the group ldgroup (configuration variable ld_group) and adds www-data (configuration variable www_user) to it, as well as any users listed in configuration variable other_users.
  3. Sets the group of /etc/litigation-database/litigation-database-private.conf to ldgroup (configuration variable ld_group).
  4. Initializes .config in the home directory of www-data (configuration variable www_user), which is necessary for Apache to be able to run libreoffice.
  5. Creates the root directory for uploads (configuration variable sys_fs_root.
  6. Initializes the monitor file for Apache2::Reload.
  7. Initializes the path for Litigation::Database::Custom modules. The directory must be writable by Apache.
  8. Creates the System Database if it does not exist.
  9. Creates the Definitions Database if it does not exist.
  10. Creates the Object Database (unless --no-db is provided).
  11. Configures PostGIS for the new Object Database (if --postgis is provided).
  12. Runs ld-makeobj
  13. Runs ld-makepasswd to create a password for the user "root" (configuration_variable admin_user) in the Definitions Database, if it was newly created.
  14. Runs ld-makepasswd to create a password for the user "root" (configuration_variable admin_user) in the new Object Database.
  15. Runs ld-sphinxconfig to create the Sphinx configuration file.
  16. Runs indexer(1) to create the Sphinx indices for the newly created databases.

ARGUMENTS

All arguments are optional.

--db=database

Create an Object Database with a specific two-digit hexadecimal ID database. If not provided, ld-makenewdb will look for the first available database ID.

--no-defs

Do not create the Definitions Database. By default, ld-makenewdb will create the Definitions Database if it does not exist.

--no-db

Do not create a new Object Database database, but run all the other tasks.

--postgis

Enable PostGIS in the new Object Database.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-litigation-database@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Jonathan Pyle <jpyle@litigationdatabase.org>

LICENCE AND COPYRIGHT

Copyright (c) 2007-2014, Jonathan Pyle <jpyle@litigationdatabase.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.