summaryrefslogtreecommitdiff
path: root/INSTALL
blob: bd2cd34ef1ba16924035292b52c8c9c80196c3da (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. DISTRO AND OS-SPECIFIC NOTES:
  9. ===============================================================================
  10. Debian users should read README.debian
  11. MANUAL INSTALL:
  12. ===============================================================================
  13. 1) Untar in desired location.
  14. 2) Decide where to put the user/session management tables. In general, we
  15. recommend as follows:
  16. a) Single dataset installations should use the user tables in the dataset.
  17. b) Multicompany installations should use user tables in a separate dataset
  18. from any accounting data.
  19. 3) Create central database
  20. a) cd to the sql/ directory of the new ledger directory.
  21. b) run "psql" with appropriate options to connect to your database.
  22. c) Run the SQL script Pg-central.sql.
  23. From psql, the command is: \i /path/to/Pg-Central.sql
  24. d) If you are going to put your data here too, run the following command:
  25. CREATE LANGUAGE PLPGSQL;
  26. Note that the psql connection should use the same username that you intend to
  27. use for the user authentication connection. If you use a different username
  28. you may find that you get an Access Denied message.
  29. 4) Set the admin password:
  30. a) From psql, determine what admin password you wish to use. Then type:
  31. "update users_conf set password = md5('my_password');"
  32. Naturally you would use your password instead of my_password.
  33. 5) Edit the ledger-smb.conf file as appropriate.
  34. a) Make sure to set the section under GlobalDBH to point to hte databae you
  35. imported Pg-central into.
  36. Congratulations, you have manually installed LedgerSMB 1.2.
  37. 6) Check Dependencies
  38. The Build.PL script can be used to test for unmet dependencies and run other
  39. tests. It doesn't install anything yet, but it will tell you what you are
  40. missing. To check for dependencies, run "perl Build.PL" from the command line.
  41. Missing dependencies can generally be installed via a Linux distributor's
  42. package manager or by CPAN. (Build.PL itself uses Module::Build, which is
  43. available in packages like perl-Module-Build or libmodule-build-perl.)
  44. Once this is done and dependencies are satisfied, you can check to see whether
  45. the installation nominally works by running "./Build test" from the command
  46. line. The test suites currently check to make sure all the perl modules load
  47. and that a number of numeric tests are passed.
  48. Dependencies which are recommended are needed only for specific functionality
  49. and may not be required in all circumstances. These include:
  50. * Net::TCLink for credit card processing in a POS environment
  51. * Parse::RecDescent for the CLI script host
  52. FTP INSTALLATION:
  53. ============================================================================
  54. If you control the server and have shell access, the
  55. instructions above are preferred over those given here.
  56. instead of those given here. This is simply a set of
  57. notes for those who must install on a shared server.
  58. If you do not have access to the server's configuration
  59. files install LedgerSMB in userspace by ftp'ing all the
  60. files to your server.
  61. a) untar ledger-smb in your private_html directory
  62. b) turn on script execution for the folder ledger-smb
  63. You can control this with an .htaccess file
  64. Options +ExecCGI
  65. DirectoryIndex login.pl
  66. c) protect the users directory with an .htpasswd file
  67. order allow,deny
  68. deny from all
  69. d) protect the templates directory with an .htpasswd file
  70. order allow,deny
  71. deny from all
  72. e) set up your PostgreSQL database and the tables. The basic
  73. procedure is specified in the INSTALL file.
  74. You will most likely only have access to PostgreSQL with
  75. some other tools like pgadmin.
  76. TROUBLESHOOTING
  77. ===========================================================================
  78. Error: Access Denied in admin.pl
  79. Likely causes:
  80. 1) The password entered may not match the password set in step 4. You can
  81. repreat that step prior to the creation of user accounts as often as you
  82. wish.
  83. After the creation of user accounts, the commant to reset the admin password
  84. is:
  85. UPDATE users_conf SET password=mp5('password') WHERE id =
  86. (select id FROM user WHERE username = 'admin');
  87. Of course, substitute 'password' for your chosen password.
  88. 2) The central database may have been created with a different user than you
  89. are using for the connection and you may not have permission to access the
  90. required database entities. To correct this, assuming that the desired
  91. database username is ledgersmb, the following commands from psql:
  92. GRANT ALL ON users TO ledgersmb;
  93. GRANT ALL ON users_id_seq TO ledgersmb;
  94. GRANT ALL ON users_conf TO ledgersmb;
  95. GRANT ALL ON session TO ledgersmb;
  96. GRANT ALL ON session_session_id_seq TO ledgersmb;