Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Installing LedgerSMB 1.3 Series (Open Source Accounting/ERP Application) On Ubuntu 11.10 (Oneiric Ocelot)

This tutorial explains how to install LedgerSMB 1.3 on an Ubuntu 11.10 system. LedgerSMB is an open source financial accounting and ERP program. As of 1.3, it offers solid AR, AP, and GL tracking as well as inventory control and fixed assets handling.

Used tarball: ledgersmb-1.3.1.tar.gz

1. Preliminary Notes

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

The IP address used is = localhost.

This tutorial is only for LedgerSMB 1.3 series.

For the 1.2 versions please refer to 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 I would like to thank also Chris Travers ( 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 into the terminal. In case of sudo commands your password will be asked.

The same goes for the needed changes in some configuration files; evidently the changes in those files have to be done manually.


2. Installation Of 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):


But they are not in the repositories. First both should be done by downloading from Sourceforge:

cd /tmp
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:


This is to be downloaded from Debian:

cd /tmp
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. I 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:


This is going to be downloaded from Ubuntu:

Just copy and paste this in your browser 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 Of Apache

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


4. Installation Of 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. For the most actual version please consult:

cd /tmp
wget (At the moment, 19-10-2011, most recent version)
tar xvfz ledgersmb-1.3.1.tar.gz
sudo mv ledgersmb /usr/local/


5. Configuration Modifications And Commands Which Enable Connection Of LedgerSMB Including Perl Modules With Apache Server

In order to get full access to Apache:

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

In order for the Apache server to work it should be connected with the appropriate config-files:

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

Then the Apache server should operate in “rewrite” mode:

sudo a2enmod rewrite

Restart of Apache is needed:

sudo /etc/init.d/apache2 restart

Some modifications of the configuration files are needed:

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

sudo gedit /usr/local/ledgersmb/

Change in line 22 ledgersmb-httpd.conf into ledgersmb-httpd.conf.template


Change in line 24 ledgersmb-httpd.conf into ledgersmb-httpd.conf.template

Restart of Apache is needed:

sudo /etc/init.d/apache2 restart


5. Installation Of The Perl Files In LedgerSMB

cd /usr/local/ledgersmb

sudo perl Makefile.PL

sudo make

This can take a long time.

Before we make test we have to install the Latex Perl module; otherwise test will fail:

sudo cpan Template::Latex

This can take long time and at the end you will see PASS

sudo make test

During the three processes three questions will be asked. Just hit Enter!


6. Installation Of The Perl Files LedgerSMB Put On Apache

cd /usr/local/ledgersmb

sudo sh

During this process similar as the previous ones three questions will be asked. Just hit Enter!

At the end:

You will be asked two questions:

Which user does your web server run as?

Type this: www-data no space!!

Where do we copy the ledgersmb-httpd.conf.template file to?

Type this: /etc/apache2/conf.d no space!!

7. Installation And Configuration Of Posgresql

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

sudo su postgres -c psql template1

postgres=# ALTER USER postgres WITH PASSWORD ‘postgres’;

USE THE PASSWORD postgres (otherwise with other applications could arise conflicts; e.g.: openbravo in the repositories).

postgres=# \q

in order to leave psql.

That alters the password for the postgres user within the database, now we need to do the same for the unix user postgres:

sudo passwd -d postgres

sudo su postgres -c passwd

Password is: postgres (see above).



Now we create the ledgersmb database which has full rights on the database with user ledgersmb:

sudo adduser ledgersmb

sudo -u postgres createuser -D -A -P ledgersmb

sudo -u postgres createdb -O ledgersmb ledgersmb

All three passwords will be asked just choose password here.

Type: \q

Type: exit

sudo gedit /usr/local/ledgersmb/ledgersmb.conf

Change line 79 /usr/share/pgsql/contrib into /usr/share/postgresql/8.4/contrib

sudo /etc/init.d/postgresql restart

Before going into LedgerSMB a restart of the system is needed.

After restart we can do the setup of LedgerSMB, which can be found on the next pages.


8. Set Up LedgerSMB

Go to your web browser and type: localhost/ledgersmb/ (see screen hereunder)

For the password you type: postgres (we did when we made postgresql database; see above).

For the database (=database of the organization) you can choose the company by yourself: type name of Company/Organization; in this example mycompany.

Click on Login:


Then you will come to this page:


Choose Yes and click on Next.

This could take some minutes before entering new screen.

Then you are directed to the following page (this could take several minutes because the database for the company will be made).

Choose language from scroll down menu: us

Then Next:


We arrive at the next page.

There is a scroll down menu. By default General.sql is the best option to see all features.

So we press Next:


At last we arrive at the second last page before we can log in.

Here you fill in the data needed according to your choice:

Import: No

Assign permission: choose Full Permissions

Then press: Create User


Attention: Now administrator with full permissions has been created!!

At last we enter the last screen before we arrive at the login screen.

Now we choose Start Using LedgerSMB:


Now we enter the Login screen of LedgerSMB.

Fill in the data you already have inserted according to the previous pages.


The next time you go to the login of your LedgerSMB, type in your browser: localhost/ledgersmb/

After we press login we arrive on this page.


As stated you should change your password. Also you can modify your preferences in the listed formats.

Important: A major difference between 1.3 and 1.2 series is the creation of users and their authorizations. Here you simply go to “System” and then to “admin users”.

Wish you a lot of pleasure!