LedgerSMB

Category:Finance /trunk
LedgerSMB is the primary accounting system we work with. Currently we use the 1.2 series in production. We are looking forward to 1.3 stabilizing, and plan to add on modules (payroll, custom material processing, etc) once it does.

Meanwhile here are install notes to put on a bare machine, basically a log of our demo instance. Note that you need to be quite careful about who has access to the raw data through phpPgAdmin (or any physical/shell access to the box) if you want to control access to the data.

Install on clean Ubuntu Gutsy

We're currently installing tagged versions from Subversion, rather than dealing with tarballs/etc. Works nearly the same on 6.06LTS (Dapper server).

Steps from the shell:

sudo apt-get install libapache2-mod-php5 postgresql-8.1 perl apache2 subversion phppgadmin build-essential
sudo mkdir /usr/local/ledgersmb
cd /usr/local/ledgersmb
svn co https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/tags/1.2.12/ .
sudo apt-get install cat dists/deb/required_debs.txt
  1. sudo cpan install Config::Std
(accept most default cpan setups, aside from picking a location/mirror)
  1. sudo cpan install Class::Std
sudo apt-get install libmodule-build-perl libconfig-std-perl libclass-std-perl # .deb instead of cpan
  1. sudo cpan install Module::Build

sudo su - postgres
createuser --no-superuser --createdb --no-createrole \
-U postgres --pwprompt --encrypted ledgersmb

exit

sudo useradd ledgersmb
sudo passwd -l ledgersmb
sudo su - ledgersmb
createdb -U ledgersmb -O ledgersmb ledgersmb
psql -U ledgersmb -d ledgersmb -f /usr/local/ledgersmb/sql/Pg-central.sql
psql -U ledgersmb -d ledgersmb
UPDATE users_conf SET password = md5('mypassword') WHERE id = 1;
\q

exit
sudo su - postgres
psql -U postgres -d ledgersmb
ALTER ROLE postgres PASSWORD 'mypassword';
\q

exit

cd /usr/local/ledgersmb
cp ledgersmb.conf.default ledgersmb.conf
vi /usr/local/ledgersmb/ledgersmb.conf

  1. update the [globaldb] appropriately

  2. Update apache:
sh configure_apache.sh
  1. Which user does your web server run as?
www-data
  1. Where do we copy the ledgersmb-httpd.conf file to?
/etc/apache2/sites-available/

perl Build.PL

sudo vi /etc/postgresql/8.1/main/postgresql.conf

  1. change line to listen on localhost
  2. also change port to 5432

sudo /etc/init.d/postgresql-8.1 start

./Build test

  1. output: Failed 2/6 test scripts, 66.67% okay. 37/1308 subtests failed, 97.17% okay.

sudo apt-get install libmodule-build-perl libconfig-std-perl

sudo a2ensite ledgersmb-httpd.conf

sudo apache2ctl -t
sudo apache2ctl graceful

Then add users via the webui, strait from the readme:
Create Datasets and Users
=========================

  1. Create Datasets:

Browse to:

http://hostname/ledgersmb/admin.pl

login with 'MYPASSWORD'

Create dataset(s) with:

User: ledgersmb
Password: MYPASSWORD

Superuser: postgres
Password: (postgres password)

Create one dataset (a postgresql datatabase) for each separate
company which will use LedgerSMB for accounting, e.g.:

ledgeracme
ledgerbigco
(...)

2) Create User(s) pointing to specific datasets:

Browse to:

http://hostname/ledgersmb/admin.pl

login with 'MYPASSWORD'

Create user(s) pointing to a specific dataset (ledgeracme, etc.)
with database login information:

User: ledgersmb
Password: MYPASSWORD

Congratulations, you have installed and configured LedgerSMB 1.2


Notes:
  • Postgres 8.3 is not yet supported. 8.1 is currently recommended.
  • We're installing as a regular user, and editing files directly through the file system. The web server user needs to be able to read and execute the appropriate files, because it currently runs under CGI.