Installing LedgerSMB 1.4.10.1 on Debian Wheezy 7.x.

Submitted by Francewhoa on Sun, 02/01/2015 - 18:13
This content is outdated and kept here for reference only!

IMPORTANT NOTE: The instructions on this page, are retained for historical purposes only.
For Up To Date installation instructions please refer to Installing LedgerSMB

***NOTE: As of 1.4.29, LedgerSMB doesn't use a Makefile.PL anymore; instead it uses a 'cpanfile' -- instructions below have been adjusted to include this difference

** Work in progress...
Goal: In this tutorial we will install LedgerSMB 1.4.10.1 on Debian Wheezy 7.x.

System requirements
• Debian Wheezy 7.8 at 64 bits
• Apache v2.x
• PostgreSQL 9.0+
• Perl 5.10+

Next actions
• This tutorial is roughly 90% done. When 100% done this note will be remove.
• We need volunteer(s) to complete the remaining 10% of this tutorial. Any volunteer? You are welcome to edit this page now :) So far the below "make test" command returns lots of errors. The following "INSTALL" text file might help to identify the missing steps or errors. https://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.4/INSTALL (link is external) It is unclear if that "INSTALL" text file is up to date for LedgerSMB 1.4.10.1.

Notes
• For installing LedgerSMB 1.3-x on Ubuntu find that other tutorial at http://ledgersmb.org/news/ubuntu-installation-tutorial-ledgersmb-13-series
• For installing LedgerSMB 1.4.10.1 on Ubuntu please consider create a new tutorial for Ubuntu. Please do not hijack this tutorial with Ubuntu instructions, because instructions, commands, and packages for Debian and Ubuntu are similar but different.
• All passwords in this tutorial are: "org" without the quotes. Feel free to change those of course.

Steps

Using Terminal as Root run the following command to install the required Perl-modules, required Texlive-modules, and their required dependencies

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.14 libuuid-perl liblocale-gettext-perl libyaml-tiny-perl libtext-iconv-perl libtext-charwidth-perl libmodule-install-perl liblatex-driver-perl libclass-std-perl libconfig-std-perl

Using Terminal as Root run the following command to install the required texlive modules, and their required dependencies. Note that this will download ~1,949 MB and could take long time.

apt-get install texlive-fonts-extra texlive-latex-extra-doc texlive-lang-all texlive-latex-extra texlive-fonts-recommended texlive texlive-doc-en texlive-generic-extra

Using Terminal as Root run the following command to install the required Apache, and related packages

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

Using Terminal as Root run the following four line of commands to install LedgerSMB 1.4.10.1
cd /tmp
wget http://downloads.sourceforge.net/project/ledger-smb/ledgersmb/1.4.10.1/ledgersmb-1.4.10.1.tar.gz
tar xvfz ledgersmb-1.4.10.1.tar.gz
mv ledgersmb /usr/local/

In the following steps we will configure Apache for LedgerSMB

Using Terminal as Root run the following command to get full access to Apache
chown -R www-data:www-data /usr/local/ledgersmb

Using Terminal as Root run the following command to connect Apache server with the appropriate config-files
sed -e "s|WORKING_DIR|$PWD|g" /usr/local/ledgersmb/ledgersmb-httpd-2.4.conf.template > /etc/apache2/conf.d/ledgersmb-httpd.conf

Using Terminal as Root run the following command to enable "mod_rewrite" Apache module
a2enmod rewrite

Using Terminal as Root run the following command to restart of Apache
service apache2 restart

Using Terminal as Root run the following command to do some modifications of the configuration-files
mv /usr/local/ledgersmb/ledgersmb.conf.default /usr/local/ledgersmb/ledgersmb.conf

Using Terminal as Root run the following command to restart of Apache again
service apache2 restart

Using Terminal as Root run the following 3 command lines to validate the installation
cd /usr/local/ledgersmb

***NOTE: the next command depends on your LedgerSMB version; up to 1.4.28, you need the commands below, which are equivalent to this single command for 1.4.29 and up:

# Executed this command for 1.4.29 and up
cpanm --notest --quiet --with-feature=latex-images --with-feature=edi \
--with-feature=latex-pdf-ps --with-feature=openoffice --installdeps .

(step only applicable for 1.4.28 and lower)
perl Makefile.PL

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 12 mandatory module(s) from CPAN?"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 4 optional module(s) from CPAN?". "Starman, CGI::Emulate::PSGI, Plack::Builder, Plack::Middleware::Static"

n

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 1 optional module(s) from CPAN?". "Image::Size"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 1 optional module(s) from CPAN?". "X12::Parser"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 2 optional module(s) from CPAN?". "Template::Plugin::Latex, TeX::Encode"

y

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 2 optional module(s) from CPAN?". "XML::Twig, OpenOffice::OODoc"

y

Using Terminal as Root run the following command to resume the compile from source procedure, and install dependencies(step only applicable for 1.4.28 and lower)

make

Terminal will return the following message
"- Your preferred file format is [2] (OOo=1 ODF=2)."
"Is that OK (y/n) ?" (step only applicable for 1.4.28 and lower)

y

Using Terminal as Root run the following command to install "Template::Latex" and its dependencies

apt-get install libtemplate-plugin-latex-perl

Notes
• Template::Latex is included in Template::Plugin::Latex which is now included in Debian as libtemplate-plugin-latex-perl.
• That command can take a long time. When done it will return the message "PASS".

Using Terminal as Root run the following command to run "test" and resume the compile from source procedure, and install dependencies (step only applicable for 1.4.28 and lower)

make test

Using Terminal as Root run the following command to install the Perl-files LedgerSMB put on Apache

cd /usr/local/ledgersmb
sh install.sh

Terminal will return the following message
"Would you like to configure as much as possible automatically?" (step only applicable for 1.4.28 and lower)

yes

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Would you like me to automatically choose some CPAN mirror sites for you? (This means connecting to the Internet)"

yes

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"Auto-install the 4 optional module(s) from CPAN? [n]"
"- Starman ...missing."
"- CGI::Emulate::PSGI ...missing."
"- Plack::Builder ...missing."
"- Plack::Middleware::Static ...missing."

n

Terminal will return the following message (step only applicable for 1.4.28 and lower)
"- TeX::Encode ...missing."
"==> Auto-install the 1 optional module(s) from CPAN? [n]"

y

Terminal will return the following message
"Which user does your web server run as?"

www-data

Notes: Make sure you do not add any space. Type in "www-data" as is without the quotes.

Terminal will return the following message
"Where do we copy the ledgersmb-httpd.conf file to?"

/etc/apache2/conf.d

Note: Ensure there are no space

Using Terminal as Root run the following command to restart of Apache again

service apache2 restart

Using Terminal as Root run the following 2 commands to install and configure Posgresql.

apt-get install postgresql-9.1 postgresql-client-9.1 postgresql-contrib-9.1 libaprutil1-dbd-pgsql
su postgres -c psql template1

Terminal will now read as following. This means you successfully entered PosgreSQL.
"postgres=#"

Using Terminal as Root run the following command to install and configure PosgreSQL. In that command replace with a password of your choosing. Keep the two 'apostrophes'. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters.

ALTER USER postgres WITH PASSWORD '';

Using Terminal as Root run the following command to leave PosgreSQL. This will also alter the password for within the database. Then return you to Debian Terminal.

\q

Using Terminal as Root run the following command to alter the password for the unix user "postgres"

passwd -d postgres

Using Terminal as Root run the following command to create ledgersmb database who has full rights on the database with user ledgersmb

adduser ledgersmb

Using Terminal as Root run the following command to switch to "ledgersmb" user

su postgres

Using Terminal as "ledgersmb" user run the following command to switch to continue the ledgersmb database setup

createuser -D -A -P ledgersmb

Terminal will return the following message.
"Enter password for new role:"
Type in a password. To reduce the risk of errors, you password must be lower case, letter and numbers only, no symbols, and less than 16 characters.

createdb -O ledgersmb ledgersmb

Terminal will return the following message.
"Shall the new role be allowed to create more new roles? (y/n)"

y

Still using Terminal as Root run the following command to reboot your system and resume activating all the above actions

reboot

In the following steps we will setup LedgerSMB

Using your favorite modern web browser such as Iceweasel go to http://localhost/ledgersmb/setup.pl (link is external)

Notes
• The name for the company database can only contain letters, digits and underscores;
• Additionally, it must start with a letter;
• Company database names are case insensitive, meaning you can't create two separate company databases called 'Ledgersmb' and 'ledgersmb'."

For the password you type give the password you gave above when you set the database user's password in the database ('postgres' was the example password given).

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” button

On the next page select yes and click on "next" button

Then you are directed to the "Database Management Console" page (This could take several minutes because the database for the company will be made)

Choose a language from scroll down menu, such as "us"

Then "Next" button

On the next page, select a option from the scroll-down menu. The default "General.sql" option is best option to see all features.

Click on "Next" button

On the "Enter User" page fill in the data needed according to your choice:

Import: "no"
Assign permission: "choose full permissions"

Click on "Create User" button

On the next screen click on "Start Using LedgerSMB" link

On the log-in page fill here in the data you already have inserted according to the previous pages

Note that the next time you want to login LedgerSMB go to http://localhost/ledgersmb/login.pl (link is external)

Click on "Login" button

On "Preferences for ***" page, for security reason, you should change your password. Also you can modify your preferences in the listed formats.

Note: A major difference between 1.4- and 1.2-series is the creation of users and their authorizations. Here you simply click on “System” link and then “admin users”.

Enjoy :)

Operating system
Release

Member for

2 years 9 months

ncg777

Thu, 09/24/2015 - 19:08

*** THIS COMMENT RELATES TO THE pre-1.4.29 EDITS OF  THE ARTICLE ***

After you issue the chown command, you should probably issue the following command: sudo chmod -R 755 /usr/local/ledgersmb Issuing the sh install.sh is redundant and unnecessary when following your instructions and those few additional steps. Before you issue the perl Makefile.PL command, install the following packages. They're all perl modules except dojo which is a javascript toolkit. sudo apt-get -y install libmodule-install-perl libtime-hires-perl libtemplate-plugin-latex-perl libsmart-comments-perl libjs-dojo-core libdatetime-perl libcgi-simple-perl libdatetime-format-strptime-perl libclass-std-perl libconfig-inifiles-perl libmoose-perl liblocale-maketext-lexicon-perl libnumber-format-perl liberror-perl libfile-mimeinfo-perl libio-stringy-perl libmime-lite-perl libmath-bigint-gmp-perl liblog-log4perl-perl libdatetime-perl libtex-encode-perl libmoo-perl libmoosex-role-withoverloading-perl libmouse-perl Then make sure your CPAN is up to date. Open the CPAN shell... sudo perl -MCPAN -e shell ... and issue the following commands: install Bundle::CPAN reload CPAN exit Also, to make your website accessible outside your local machine, edit /etc/apache2/conf.d/ledgersmb-httpd.conf Comment the following lines: Require ip 127.0.0.1 Require host localhost Require all denied ... and add the following line: Allow from all Afterwards, all tests should pass. Or have I missed something? I've installed it on my raspberry pi running raspbian and so far, it's working.

Member for

2 years 9 months

pbolger

Fri, 09/25/2015 - 14:52

This worked for me on Debian Wheezy (Cinnamon) - thanks.

One problem though: In the LedgerSMB web interface the preferences don't seem to save. Everything else seems ok though.

Member for

6 years

ehu

Fri, 09/25/2015 - 15:25

Hi pbolger,

Thanks for the report! Through different channels, the same issue was reported to me earlier this week; a fix will be included in the 1.4.16 release.

 

 

Regards,

Erik.