Overview
Starting from Fedora 10 Live Installed to Harddisk.

This is a a record of the chronological steps with all the errors I encountered along the way. As such it is a kind of messy and in a as it happened style.

I will flesh these notes out as I have time. Email me if you have a question.

Install postgres
yum install postgresql-server

Install Latex
yum install texlive

Download and Install LedgerSMB
download the latest version of ledgersmb in noarch.rpm format
Install it.
rpm -Uvh ledgersmb-1.2.17-1.noarch.rpm

LedgerSMB Installation Errors
warning: ledgersmb-1.2.17-1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 8da0af10
error: Failed dependencies:
tetex-latex is needed by ledgersmb-1.2.17-1.noarch
perl-DBD-Pg is needed by ledgersmb-1.2.17-1.noarch
perl-Smart-Comments is needed by ledgersmb-1.2.17-1.noarch
perl-MIME-Lite is needed by ledgersmb-1.2.17-1.noarch
perl-Class-Std >= 0.0.8 is needed by ledgersmb-1.2.17-1.noarch
perl-Config-Std >= 0.0.4 is needed by ledgersmb-1.2.17-1.noarch
perl-Locale-Maketext-Lexicon >= 0.62 is needed by ledgersmb-1.2.17-1.noarch

Install dependencies
yum install tetex-latex perl-DBD-Pg perl-Smart-Comments \
perl-MIME-Lite perl-Class-Std \
perl-Config-Std yum install perl-Locale-Maketext-Lexicon

Install Dummy perl-Config-Std
Download and install the perl-Config-Std from http://dag.wieers.com/rpm/packages/perl-Config-Std/
(This is only so rpm -Uvh doesn’t complain about deps – see errors below).

Turn Postgres On
chkconfig postgresql on
service postgresql initdb
service postgresql start

Read and Follow the LedgerSMB Installation Instructions
vi /usr/share/doc/ledgersmb-1.2.17/INSTALL

Create the LedgerSMB user and DB
1st Attempt
[root@f10 jmcd]# createuser –no-superuser –createdb –no-createrole -U postgres –pwprompt –encrypted ledgersmb
Enter password for new role: LSMB_PASSWORD
Enter it again: LSMB_PASSWORD
createuser: could not connect to database postgres: FATAL: Ident authentication failed for user “postgres”

2nd Attempt
[root@f10 jmcd]# su – postgres
-bash-3.2$ createuser –no-superuser –createdb –no-createrole -U postgres –pwprompt –encrypted ledgersmb
Enter password for new role: LSMB_PASSWORD
Enter it again: LSMB_PASSWORD

-bash-3.2$ createdb -U ledgersmb -O ledgersmb ledgersmb
createdb: could not connect to database postgres: FATAL: Ident authentication failed for user “ledgersmb”

Change Authentication Method for Postgres
Backup pg_hba.conf before you begin.
cp /var/lib/pgsql/data/pg_hba.conf /root
vi /var/lib/pgsql/data/pg_hba.conf
Change ident sameuser to md5 in all options.
# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

service postgresql restart

[root@f10 jmcd]# su - postgres
-bash-3.2$ createdb -U ledgersmb -O ledgersmb ledgersmb
Password: LSMB_PASSWORD

exit to root

Apply the LedgerSMB Postgres SQL Script
find the Pg-central script
rpm -q ledgersmb --list | grep Pg-central
/usr/share/ledgersmb/sql/Pg-central.sql
[root@f10 jmcd]# psql -U ledgersmb -d ledgersmb -f /usr/share/ledgersmb/sql/Pg-central.sql
Password for user ledgersmb: LSMB_PASSWORD

Should see the following:
BEGIN
psql:/usr/share/ledgersmb/sql/Pg-central.sql:8: NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
psql:/usr/share/ledgersmb/sql/Pg-central.sql:8: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
psql:/usr/share/ledgersmb/sql/Pg-central.sql:8: NOTICE: CREATE TABLE / UNIQUE will create implicit index "users_id_key" for table "users"
CREATE TABLE
COMMENT
psql:/usr/share/ledgersmb/sql/Pg-central.sql:41: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_conf_pkey" for table "users_conf"
CREATE TABLE
COMMENT
COMMENT
COMMENT
INSERT 0 1
INSERT 0 1
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
psql:/usr/share/ledgersmb/sql/Pg-central.sql:76: NOTICE: CREATE TABLE will create implicit sequence "session_session_id_seq" for serial column "session.session_id"
psql:/usr/share/ledgersmb/sql/Pg-central.sql:76: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "session_pkey" for table "session"
CREATE TABLE
COMMIT

Change Password for the LedgerSMB User
[root@f10 jmcd]# psql -U ledgersmb -d ledgersmb
Password for user ledgersmb: PASSWORD
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

ledgersmb=> UPDATE users_conf SET password = md5('LSMB_PASSWORD') WHERE id = 1;
UPDATE 1
ledgersmb=>\q

Edit the Apache Configuration to point to the correct location
open /etc/httpd/conf.d/ledgersmb.conf in vi
and find and replace WORKING_DIR with /usr/share/ledgersmb

service httpd reload

First Login to LedgerSMB Webpage
Open a browser and enter:
http://192.168.0.1:8888/ledgersmb/admin.pl

Browser Errors
Get a browser Server 500 error

Look in /var/log/httpd/error_log for cause

[Tue Dec 30 19:59:40 2008] [error] [client 192.168.0.2] Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at LedgerSMB/Form.pm line 36
[Tue Dec 30 19:59:43 2008] [error] [client 192.168.0.2] Can't locate Config/Std.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/local/lib/perl5/site_perl .) at LedgerSMB/Sysconfig.pm line 8.
[Tue Dec 30 19:59:43 2008] [error] [client 192.168.0.2] BEGIN failed--compilation aborted at LedgerSMB/Sysconfig.pm line 8.
[Tue Dec 30 19:59:43 2008] [error] [client 192.168.0.2] Compilation failed in require at /usr/share/ledgersmb/login.pl line 52.
[Tue Dec 30 19:59:43 2008] [error] [client 192.168.0.2] BEGIN failed--compilation aborted at /usr/share/ledgersmb/login.pl line 52.
[Tue Dec 30 19:59:43 2008] [error] [client 192.168.0.2] Premature end of script headers: login.pl
[Tue Dec 30 19:59:51 2008] [error] [client 192.168.0.2] Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at LedgerSMB/Form.pm line 36

Install Math::BigInt
yum install perl-Math-BigInt-GMP.i386

Try again

http://192.168.0.1:8888/ledgersmb/admin.pl
Get a browser Server 500 error

And again look in error_log

[Tue Dec 30 23:58:52 2008] [error] [client 192.168.0.2] Can't locate Config/Std.pm in @INC (@INC contains: /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/local/lib/perl5/site_perl .) at LedgerSMB/Sysconfig.pm line 8.
[Tue Dec 30 23:58:52 2008] [error] [client 192.168.0.2] BEGIN failed--compilation aborted at LedgerSMB/Sysconfig.pm line 8.
[Tue Dec 30 23:58:52 2008] [error] [client 192.168.0.2] Compilation failed in require at /usr/share/ledgersmb/login.pl line 52.
[Tue Dec 30 23:58:52 2008] [error] [client 192.168.0.2] BEGIN failed--compilation aborted at /usr/share/ledgersmb/login.pl line 52.
[Tue Dec 30 23:58:52 2008] [error] [client 192.168.0.2] Premature end of script headers: login.pl

Cause of above error is: can’t find Config/Std because the one above we installed was for perl 5.8.*

Install Perl Module Config::Std
Install CPAN
yum install perl-CPAN

Run CPAN and install Config::Std
perl -MCPAN -e shell

at cpan shell prompt
install Config::Std

http://192.168.0.1:8888/ledgersmb/admin.pl
It’s Working!
OK now it works (I get the admin login panel)

Configure a password for the postgres user
Now problem with admin.pl and me not knowing the postgres password so restore original auth settings for postgres and log in as postgres user and set a password.

I saved a copy of the original pg_hba.conf… so restore this and restart postgres

[root@f10 ledgersmb]# cp /var/lib/pgsql/data/pg_hba.conf /root/pg_hba.conf.smbl
[root@f10 ledgersmb]# cp /root/pg_hba.conf /var/lib/pgsql/data/
cp: overwrite `/var/lib/pgsql/data/pg_hba.conf'? y
[root@f10 ledgersmb]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]

Give postgres a password
[root@f10 ledgersmb]# su postgres
bash-3.2$ psql -d template1
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=# ALTER USER postgres WITH PASSWORD 'POSTGRES_USER_PASSWORD';
ALTER ROLE
template1=#

Restore the ledgersmb conf file (with md5 password auth)
[root@f10 ledgersmb]# cp /root/pg_hba.conf.smbl /var/lib/pgsql/data/pg_hba.conf
cp: overwrite `/var/lib/pgsql/data/pg_hba.conf'? yes
[root@f10 ledgersmb]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]

Login to admin.pl and configure dataset and user
Now again go to admin.pl and create the dataset with the correct postgres user and password.
Normal user is ledgersmb and password is LSMB_PASSWORD
superuser is postgres password is POSTGRES_USER_PASSWORD

Next add a user specifying the dataset you created.

Open /etc/ledgersmb/ledgersmb.conf
and change
sendmail = /usr/bin/sendmail -t
to
sendmail = /usr/sbin/sendmail -t

Done

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…