LedgerSMB for Debian -------------------- Optional Perl modules Net::TCLink [Support for TrustCommerce credit card processing] Parse::RecDescent [Support for the *experimental* scripting engine] Template::Plugin::Latex [Support for Postscript and PDF output] XML::Twig [Support for OpenOffice output] Excel::Template::Plus [Support for Excel output] The credit card processing support for TrustCommerce is available repository as libnet-tclink-perl if not already installed: The Open Office output support is available as libxml-twig-perl if it is not already installed. The scripting engine support is available as libparse-recdescent-perl if it is not already installed: If the libtemplate-plugin-latex-perl package needed for the PDF/Postscript output option is not available, then if you want to use that option you will need to download the module Template::Plugin::Latex from CPAN. Please note that the PDF/Postscript module depends on the TeX/LaTeX package which is available as texlive-latex-recommended. If the libexcel-template-plus-perl package needed for the Excel output option is not available, then if you want to use that option you will need to download Excel::Template::Plus module from CPAN. Initializing a company database LedgerSMB 1.3 stores data for each company in a separate "database". A database is a PostgreSQL concept for grouping tables, indexes, etc. Each company database must be named. This name is essentially the system identifier within PostgreSQL for the company's dataset. The name for the company database can only contain letters, digits and underscores. Additionally, it must start with a letter. Company database names are case insensitive, meaning you can't create two separate company databases called 'Ledgersmb' and 'ledgersmb'. One way you can create databases fairly easily is by directing your web browser to the setup.pl script at your installed ledgersmb directory. So if the base URL is http://localhost/ledgersmb/, you can access the database setup and upgrade script at http://localhost/ledgersmb/setup.pl. This is very different from the approaches taken by LedgerSMB 1.2.x and earlier and SQL-Ledger, but rather forms a wizard to walk you through the process. Please note that the setup.pl file assumes that LedgerSMB is already configured to be able to access the database and locate the relevant PostgreSQL contrib scripts. In particular, you must have the contrib_dir directive set to point to those scripts properly in your ledgersmb.conf before you begin. If you are upgrading from 1.2, your 1.2 tables will be moved to schema lsmb12. Please keep this schema for some months. Updates which need this schema may still be necessary. An alternative method is the 'prepare-company-database.sh' script, which can be useful in creating and populating databases from the command line and it offers a reference implementation written in BASH for how this process is done. The 'prepare-company-database.sh' script in the tools/ directory will set up databases to be used for LedgerSMB. The script should be run as 'root' because it wants to 'su' to the postgres user. Alternatively, if you know the password of the postgres user, you can run the script as any other user. You'll be prompted for the password. Additionally, the script creates a superuser to assign ownership of the created company database to. By default this user is called 'ledgersmb'. The reason for this choice is that when removing the ledgersmb user, you'll be told about any unremoved parts of the database, because the owner of an existing database can't be removed until that database is itself removed. The following invocation of the script sets up your first test company, when invoked as the root user and from the root directory of the LedgerSMB sources: $ ./tools/prepare-company-database.sh --company testinc The script assumes your PostgreSQL server runs on 'localhost' with PostgreSQL's default port (5432). Upon completion, it'll have created a company database with the name 'testinc', a user called 'ledgersmb' (password: 'LEDGERSMBINITIALPASSWORD'), a single user called 'admin' (password: 'admin') and the roles required to manage authorizations. Additionally, it'll have loaded a minimal list of languages required to successfully navigate the various screens. All these can be adjusted using arguments provided to the setup script. See the output generated by the --help option for a full list of options. Note: The script expects to be able to connect to the postgresql database server over a TCP/IP connection after initial creation of the ledgersmb user. The ledgersmb user will be used to log in. To ensure that's possible, it's easiest to ensure there's a row in the pg_hba.conf file [the file which says how PostgreSQL should enforce its login policy] with a 'host' configuration for the 127.0.0.1/32 address and the md5 authentication enforcement. This line can be inserted for the duration of the configuration of LedgerSMB, if the file doesn't have one. The line can safely be removed afterwards. Manual configuration ==================== If you want to perform the installation of the company database completely manually, you should consult the 'prepare-company-database.sh' script that is available in the /usr/share/ledgersmb/tools/ directory as the authorative documentation of the steps to perform. Company database removal ======================== In the /usr/share/ledgersmb/tools/ directory, there's a script which will remove a company database and all the standard authorization data that had been created by the 'prepare-company-database.sh' script. The script is named 'delete-company-database.sh'. -- Robert James Clay Tue, 15 Dec 2011 11:46:38 -0500