summaryrefslogtreecommitdiff
path: root/INSTALL
blob: ccc8c5a7d0bd7480cb94625625888a1d489439d5 (plain)
  1. Installing LedgerSMB 1.2
  2. This document contains information on how to install LedgerSMB. We recommend
  3. that the reader start by reading the section on manual installation and then
  4. start by trying the automated means mentioned later.
  5. Also this document assumes that the reader is already familiar with the release
  6. notes. If you have not already done so, please read the release_notes file in
  7. the doc/ directory.
  8. MANUAL INSTALL:
  9. ===============================================================================
  10. 1) Untar in desired location.
  11. 2) Decide where to put the user/session management tables. In general, we
  12. recommend as follows:
  13. a) Single dataset installations should use the user tables in the dataset.
  14. b) Multicompany installations should use user tables in a separate dataset
  15. from any accounting data.
  16. 3) Create central database
  17. a) cd to the sql/ directory of the new ledger directory.
  18. b) run "psql" with appropriate options to connect to your database.
  19. c) Run the SQL script Pg-central.sql.
  20. d) If you are going to put your data here too, run the following command:
  21. CREATE LANGUAGE PLPGSQL;
  22. Note that the psql connection should use the same username that you intend to
  23. use for the user authentication connection. If you use a different username
  24. you may find that you get an Access Denied message.
  25. 4) Set the admin password:
  26. a) From psql, determine what admin password you wish to use. Then type:
  27. "update users_conf set password = md5('my_password');"
  28. Naturally you would use your password instead of my_password.
  29. 5) Edit the ledger-smb.conf file as appropriate.
  30. Congratulations, you have manually installed LedgerSMB 1.2.
  31. 6) Check Dependencies
  32. The Build.PL script can be used to test for unmet dependencies and run other
  33. tests. It doesn't install anything yet, but it will tell you what you are
  34. missing. To check for dependencies, run "perl Build.PL" from the command line.
  35. Missing dependencies can generally be installed via a Linux distributor's
  36. package manager or by CPAN. (Build.PL itself uses Module::Build, which is
  37. available in packages like perl-Module-Build or libmodule-build-perl.)
  38. Once this is done and dependencies are satisfied, you can check to see whether
  39. the installation nominally works by running "./Build test" from the command
  40. line. The test suites currently check to make sure all the perl modules load
  41. and that a number of numeric tests are passed.
  42. Dependencies which are recommended are needed only for specific functionality
  43. and may not be required in all circumstances. These include:
  44. * Net::TCLink for credit card processing in a POS environment
  45. * Parse::RecDescent for the CLI script host
  46. TROUBLESHOOTING
  47. ===========================================================================
  48. Error: Access Denied in admin.pl
  49. Likely causes:
  50. 1) The password entered may not match the password set in step 4. You can
  51. repreat that step prior to the creation of user accounts as often as you
  52. wish.
  53. After the creation of user accounts, the commant to reset the admin password
  54. is:
  55. UPDATE users_conf SET password=mp5('password') WHERE id =
  56. (select id FROM user WHERE username = 'admin');
  57. Of course, substitute 'password' for your chosen password.
  58. 2) The central database may have been created with a different user than you
  59. are using for the connection and you may not have permission to access the
  60. required database entities. To correct this, assuming that the desired
  61. database username is ledgersmb, the following commands from psql:
  62. GRANT ALL ON users TO ledgersmb;
  63. GRANT ALL ON users_id_seq TO ledgersmb;
  64. GRANT ALL ON users_conf TO ledgersmb;
  65. GRANT ALL ON session TO ledgersmb;
  66. GRANT ALL ON session_session_id_seq TO ledgersmb;