INSTALLING LEDGERSMB-1.3-SERIES (OPEN SOURCE ACCOUNTING/ERP APPLICATION ON 
UBUNTU ONERIC OCELOT UBUNTU 11.10 

by Frans van der Star (f.van.der.star@gmail.com)

Date: 31-10-2011

1. Preliminary Notes

The installation took place on an “empty” fresh installed basic system Ubuntu 11.10 DESKTOP

The IP-address used is http://127.0.0.1.

This tutorial is only for LedgerSMB 1.3.-series

For the 1.2-versions would like to refer to http://www.howtoforge.com/ledgersmb_debian_etch of which author is Falko Timme.: Installing LedgerSMB (Open Source Accounting Application) on Debian Etch.
Only with this remark that libmd5-perl is not in the repositories anymore. Hereunder you will find how to download and install this Perl-module.

Thanks to Falko I could explore LedgerSMB in the beginning.
Evidently would like to thank also Chris Travers (www.ledgersmb.org) who has assisted me a lot.

Of course there is no guarantee that this will work in general terms.

This instruction is made with the intention that you can copy and paste the commands colored in bolt blue in the “terminal” In case of “sudo-commands” your password will be being asked.

The same is for the needed changes in some configuration files; evidently the changes in those files you have to do this by manually typing. 

2.Installation required Perl-modules and required Texlive-modules

sudo apt-get install libdata-dumper-simple-perl perl-modules liblocale-maketext-lexicon-perl libdbi-perl libdbd-pg-perl libconfig-any-perl libmime-lite-perl libhtml-linkextractor-perl libnet-tclink-perl libparse-recdescent-perl libmodule-build-perl libperl5.12 libuuid-perl liblocale-gettext-perl libyaml-tiny-perl libtext-iconv-perl libtext-charwidth-perl  libmodule-install-perl              liblatex-driver-perl                  (this is one command)

There are another three modules to be installed, the first two: (SOURCE: Falko Timme)
libclass-std-perl 
libconfig-std-perl
But they are not in the repositories.
First both should be done by downloading from Sourceforge:

cd /tmp
wget http://mesh.dl.sourceforge.net/sourceforge/ledger-smb/deb-prereq-1.2.8.tar.gz
tar xvfz deb-prereq-1.2.8.tar.gz
cd deb-prereq-1.2
 sudo dpkg -i libclass-std-perl_0.0.8-1_all.deb libconfig-std-perl_0.0.4-1_all.deb


The last one is:
libmd5-perl
This is to be downloaded from Debian

cd /tmp
wget http://ftp.debian.org/pool/main/libm/libmd5-perl/libmd5-perl_2.03-1_all.deb
sudo dpkg -i libmd5-perl_2.03-1_all.deb

In connection with the above mentioned installed Perl-modules a few texlive modules should be installed also. Would like to emphasize if those are not installed Perl will not work with the LedgerSMB!!!  

sudo apt-get install texlive-fonts-extra texlive-latex-extra-doc texlive-lang-all texlive-latex-extra texlive-fonts-recommended texlive texlive-doc-en
This could take long time (700MB)!!!

Unfortunately one needed Texlive-module is not in the repositories:
-texlive-generetic-extra

This is going to be downloaded from Ubuntu:
http://packages.ubuntu.com/lucid/texlive-generic-extra
Just click on this in order to enter this website.
Under the page you will see this:”Download texlive-generic-extra” and go to 
“all” under “architecture” then choose a “site” (a lot) for download and choose save.
In order to install this do the following:

cd ~/Downloads
sudo dpkg -i texlive-generic-extra_2009-7ubuntu3_all.deb 


3. Installation Apache

sudo apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert



sudo apt-get install build-essential










4. Installation LedgerSMB-1.3

As stated before this tutorial is only for the LedgerSMB-1.3-series. For the 1.2-series would like to refer to my preliminary notes in 1.

cd /tmp
wget http://switch.dl.sourceforge.net/sourceforge/ledger-smb/ledgersmb-1.3.2.tar.gz (At the moment, 17-10-2011, most recent version)
tar xvfz ledgersmb-1.3.2.tar.gz
sudo mv ledgersmb /usr/local/

5. Configuration modifications and commands, which enable
   connection LedgerSMB including Perl-modules with Apache-        
   server

First become root.

sudo -i

chown -R www-data:www-data /usr/local/ledgersmb/

sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd.conf.template > /etc/apache2/conf.d/ledgersmb-httpd.conf 

mv /usr/local/ledgersmb/ledgersmb.conf.default /usr/local/ledgersmb/ledgersmb.conf

gedit /usr/local/ledgersmb/install.sh
Change in line 22 “ledgersmb-httpd.conf” into “ledgersmb-httpd.conf.template
AND:
Change in line 24 “ledgersmb-httpd.conf” into “ledgersmb-1.3.conf”
After this save this and close this file later changed this in ledgersmb-httpd.conf.template

a2enmod rewrite

sudo chmod 777 -R /etc/apache2/conf.d

sudo chmod 777 -R /etc/apache2/conf.d/ledgersmb-httpd.conf.template

/etc/init.d/apache2 restart

5. Installation of the Perl-files in LedgerSMB

cd /usr/local/ledgersmb

perl Makefile.PL

make

make test   gives errors will send you the log


5. Installation and configuration Posgresql

sudo -i

apt-get install postgresql-8.4 postgresql-client-8.4 postgresql-contrib-8.4 libaprutil1-dbd-pgsql



su -m postgres

psql -U postgres

ALTER USER postgres WITH PASSWORD 'postgres';

\q

Of course you should choose a different password for postgres than 'postgres.'  
Just remember it for future steps!

createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb

fill password of your choice

exit

adduser ledgersmb

su -m ledgersmb

createdb -U ledgersmb -O ledgersmb ledgersmb

psql -U ledgersmb -d ledgersmb


\q

exit

gedit /usr/local/ledgersmb/ledgersmb.conf

change line 79  “/usr/share/pgsql/contrib” into /usr/share/postgresql/8.4/contrib
