summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 1f4dca68e92cd757831ead0a96c6e7ad9d990132 (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. To be integrated into the documentation, these minimalist steps have made
  20. installation/migration of ledger-smb much easier for me:
  21. 3) Create a admin database role named 'ledgersmb':
  22. bash$ createuser --no-superuser --createdb --no-createrole -U postgres
  23. --pwprompt --encrypted ledgersmb
  24. 4) Create a central user database database, owned by admin role:
  25. bash$ createdb -U ledgersmb -O ledgersmb ledgersmb
  26. 5) Run the included SQL commands to configure the central user database:
  27. bash$ psql -U ledgersmb -d ledgersmb -f (ledgerpath)/sql/Pg-central.sql
  28. 6) Update your admin password in the central user database
  29. (change MYPASSWORD to your preferred administrative password).
  30. bash$ psql -U ledgersmb -d ledgersmb
  31. ledgersmb=> UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;
  32. 7) Quit the interactive SQL console:
  33. ledgersmb=> \q
  34. Configure apache, visit admin.pl, login with MYPASSWORD, create datasets
  35. with user ledgersmb, superuser postgres, create users pointing to datasets,
  36. etc.
  37. 8) Edit the ledger-smb.conf file as appropriate.
  38. a) Make sure to set the section under GlobalDBH to point to hte databae you
  39. imported Pg-central into.
  40. 9) Add configuration to Apache:
  41. bash$ sh configure_apache.sh
  42. 10) Check Dependencies
  43. The Build.PL script can be used to test for unmet dependencies and run other
  44. tests. It doesn't install anything yet, but it will tell you what you are
  45. missing. To check for dependencies, run "perl Build.PL" from the command line.
  46. Missing dependencies can generally be installed via a Linux distributor's
  47. package manager or by CPAN. (Build.PL itself uses Module::Build, which is
  48. available in packages like perl-Module-Build or libmodule-build-perl.)
  49. Once this is done and dependencies are satisfied, you can check to see whether
  50. the installation nominally works by running "./Build test" from the command
  51. line. The test suites currently check to make sure all the perl modules load
  52. and that a number of numeric tests are passed.
  53. Dependencies which are recommended are needed only for specific functionality
  54. and may not be required in all circumstances. These include:
  55. * Net::TCLink for credit card processing in a POS environment
  56. * Parse::RecDescent for the CLI script host
  57. 11) Restart Apache (instructions may vary with your Linux distro).
  58. 12) Create Datasets and Users:
  59. Visit http://hostname/ledger-smb/admin.pl, login with MYPASSWORD,
  60. Create datasets with user ledgersmb, superuser postgres
  61. Create users pointing to datasets.
  62. Congratulations, you have manually installed LedgerSMB 1.2.
  63. FTP INSTALLATION:
  64. ============================================================================
  65. If you control the server and have shell access, the
  66. instructions above are preferred over those given here.
  67. instead of those given here. This is simply a set of
  68. notes for those who must install on a shared server.
  69. If you do not have access to the server's configuration
  70. files install LedgerSMB in userspace by ftp'ing all the
  71. files to your server.
  72. a) untar ledger-smb in your private_html directory
  73. b) turn on script execution for the folder ledger-smb
  74. You can control this with an .htaccess file
  75. Options +ExecCGI
  76. DirectoryIndex login.pl
  77. c) protect the users directory with an .htpasswd file
  78. order allow,deny
  79. deny from all
  80. d) protect the templates directory with an .htpasswd file
  81. order allow,deny
  82. deny from all
  83. e) set up your PostgreSQL database and the tables. The basic
  84. procedure is specified in the INSTALL file.
  85. You will most likely only have access to PostgreSQL with
  86. some other tools like pgadmin.
  87. TROUBLESHOOTING
  88. ===========================================================================
  89. Error: Access Denied in admin.pl
  90. Likely causes:
  91. 1) The password entered may not match the password set in step 4. You can
  92. repreat that step prior to the creation of user accounts as often as you
  93. wish.
  94. After the creation of user accounts, the commant to reset the admin password
  95. is:
  96. UPDATE users_conf SET password=mp5('password') WHERE id =
  97. (select id FROM user WHERE username = 'admin');
  98. Of course, substitute 'password' for your chosen password.
  99. 2) The central database may have been created with a different user than you
  100. are using for the connection and you may not have permission to access the
  101. required database entities. To correct this, assuming that the desired
  102. database username is ledgersmb, the following commands from psql:
  103. GRANT ALL ON users TO ledgersmb;
  104. GRANT ALL ON users_id_seq TO ledgersmb;
  105. GRANT ALL ON users_conf TO ledgersmb;
  106. GRANT ALL ON session TO ledgersmb;
  107. GRANT ALL ON session_session_id_seq TO ledgersmb;