Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LedgerSMB how to and support
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Fri Jul 13, 2007 6:23 pm    Post subject: LedgerSMB how to and support Reply with quote

Is any one tried out LedgerSMB?
Seems like a fork of Sql-ledger catering to small and medium business.
http://sourceforge.net/projects/ledger-smb/
Interesting statement of direction
_________________
Donate to Gentoo


Last edited by turtles on Tue Mar 04, 2008 3:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Sep 19, 2007 12:26 am    Post subject: Re: LedgerSMB anyone? Reply with quote

Are you using LedgerSMB?
I had a chance to install it but not test it.

#Joseph
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 01, 2007 10:02 pm    Post subject: ledgersmb with gentoo overlay Reply with quote

No I am not using it yet.

Changed & edited 3rd of march 2008: made more of a how to
Edited again on 6th mar 2008

To emerge ledgersmb:

  1. See Gentoo overlays. You will need some overlay stuff in /etc/make.conf this worked for me but you will need to check your installation variables:
    Code:
    source /usr/portage/local/layman/make.conf
     PORTDIR_OVERLAY="/usr/local/portage ${PORTDIR_OVERLAY}"
    .
  2. Check that you have the apache2 use flag enabled. ledgersmb seems to have a creditcard and a scripting USE flag enable these if you want.
  3. Emerge the packages:
    Code:
    emerge -av subversion layman
  4. Then install the webapps-experimental overlay
    Code:
    layman -a webapps-experimental
    .
  5. Add the needed package names to package.keywords (create the file if you dont have it)
    Code:
    echo '#webapps-experimental
    www-apps/ledgersmb
    dev-perl/Class-Std
    dev-perl/Config-Std
    dev-perl/Net-TCLink' >>/etc/portage/package.keywords

  6. I had to install 2 dependencies with g-cpan. They seem to be in the webapp-overlay too but do not work with my setup. I had g-cpan installed allready that could by why. You can skip this step and come back to it if you get an internel server error and missing modules in your apache2 error logs.
    Code:
    emerge -av g-cpan
    Code:
    mkdir /usr/local/portage/perl-gcpan/
    and install the perl modules
    Code:
    g-cpan -i Class::Std Config::Std

  7. If you will want to do any printing you will need
    Code:
    emerge app-text/Texlive
    as well as working cups install.
  8. Finally install ledgersmb
    Code:
    emerge -av ledgersmb

  9. When installing sql-ledger and ledger smb I ran into the need to:
    Code:
    su postgres
    Code:
    createlang plpgsql template1
    other wise I get errors later on.
  10. For postgresql (8.2.x)
    Code:
    su postgres
    Code:
    createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb
      Enter password for new user:
       Enter it again:
       Shall the new user be allowed to create more new users? (y/n) y
       CREATE USER
       
    Note postgresql 8.3 does not work well with ledgersmb yet.
    The prompted password (referred to as MYROLEPASSWORD) will later be used in the DBConnect: string in the configuration file 'ledgersmb.conf'
  11. Create the admin data base the last line here will be it's name ledgersmb_db if you use another name be sure to change it later.
    Code:
    createdb -U ledgersmb -O ledgersmb ledgersmb_db
    and
    Code:
    psql -U ledgersmb -d ledgersmb_db -f /var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql

  12. If you are going to be working alot with ledgersmb.conf templates or what not you might want to add an alias to your bashrc
    Code:
    echo 'alias lsmb="cd /var/www/localhost/htdocs/ledgersmb"'>> ~/.bashrc
    so whenever you type lsmb you are moved to /var/www/localhost/htdocs/ledgersmb. It wont work until you logout then in.
  13. Set the admin password (yeah i got that we did that allready feeling too)
    Code:
    psql -U ledgersmb -d ledgersmb_db
    Then from in psql change "MYPASSWORD" to your password:
    ledgersmb_db=#
    Code:
     UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;

    then exit
    Code:
    l\q
    .
  14. Edit the config file:
    Code:
    nano /var/www/localhost/htdocs/ledgersmb/ledgersmb.conf
    and add your password, check your printer was added and your database name.
  15. See the code listings 10 & 11 below on securing postgres.
  16. Apache2 configuration:
    Code:
    nano /etc/apache2/vhosts.d/00_default_vhost.conf

    and adding this text:
    Code:
    <Directory /var/www/localhost/htdocs/ledgersmb/>
      AllowOverride All
      AddHandler cgi-script .pl
      Options ExecCGI Includes FollowSymlinks
      Order Allow,Deny
      Allow from All
    </Directory>

    # Prevent unauthorized access to configuration
    # and access control files
    <Directory /var/www/localhost/htdocs/ledgersmb/users>
      Order Deny,Allow
      Deny from All
    </Directory>


  17. Test the install with Build.PL (If you can find it) for me it was at:
    Code:
    perl /usr/share/doc/ledgersmb-1.2.8/contrib/Build.PL

    However on another install I fond it at
    Code:
     /usr/local/ledgersmb/

[*] Go to http://localhost/ledgersmb/admin.pl and create users and datasets as needed.
Admin.pl > pg-admin > create dataset ask's for the "superuser" and the super user password which is the ledgersmb postgres user I think.

now for the testing it out part.
_________________
Donate to Gentoo


Last edited by turtles on Wed Jun 03, 2009 5:50 am; edited 20 times in total
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sat Dec 01, 2007 10:33 pm    Post subject: Reply with quote

turtles wrote:
No I am not using it yet.
I did just figure out a easy way to install it.

To emerge ledgersmb:

  1. We may need to brush up on Gentoo overlays.
  2. Then install the webapps-experimental overlay
    Code:
    layman -L webapps-experimental
    .
  3. Code:
    echo echo '#webapps-experimental
    www-apps/ledgersmb
    dev-perl/Class-Std
    dev-perl/Config-Std' >>/etc/portage/package.keywords

  4. Code:
    emerge -av ledgersmb



now for the testing it out part.


Did LedgerSMB worked after this installation? or you mean testing LedgerSMB in general?
Are you using SQL-Ledger?

I'm still on SQL-Ledger 2.2.7 and I don't know how to upgrade to LedgerSMB there is not enough information.
Besides watching the LedgerSMB forum they still have a bit of bugs in there so I don't know if it is ready for production.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sun Dec 02, 2007 7:14 am    Post subject: Reply with quote

I am using sql-ledger now on a Gentoo server.
I am looking into switching to ledgersmb.
I am installing ledgersmb on my laptop for testing and planning on installing the data from a sql-ledgerbackup.tar.gz file.
If it makes it thru the testing phase I will build a new gentoo-hardened enterprise server and get it ready for production use, then we will start porting our templates and custom code to ledgersmb......

the emerge runs ok until it gets confused which apache I have.
Code:
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=net-www/apache-1.3" or correct your settings.
* Fatal error(s) - aborting

I dont now what configuration file they are talking about?
make.conf?
I will set the apache2 use flag and rebuild apache to see f that fixes it.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sun Dec 02, 2007 7:48 am    Post subject: Reply with quote

Here are my notes from my installation, I've make an html document if you want I can send it to you.
But here it is in plain text (so separate code from my notes). Going through my instructions you will be able to install LedgerSMB
Pay attention to configuration in file "pg_hba.conf" I created my so it is compatible with sql-ledger.

What version of SQL-Ledger are you running?
If you are converting from 2.2.7 keep some notes for me :-)

Code:
LedgerSMB Manual Installation Instructions
LedgerSMB ver. 1.2
 Updated: Sept. 18, 2007
 
 
This document contains information on how to install LedgerSMB on various distributions. We recommend that the reader start by reading the section on manual installation and then start by trying the automated means mentioned later.
 
 Additional release_notes file are in the doc/ directory.
 
 COPYRIGHT:  Licensed under the terms of the GPL.
 PLATFORMS:   Non specific, see requirements.
 FOREIGN LANGUAGE SUPPORT:  28 languages are supported. Language files are ordinary text files, no special software is needed to change or add new translations.
 
 
 General Requirements (for all distributions):
 1 - Perl, 5.8+
 2 - http server (Apache, NCSA, httpi, thttpd, ...)
 3 - SQL Server (PostgreSQL 8.0+)
 4 - DBD (DBD-Pg)
 5 - DBI
 6 - Locale::Maketext::Lexicon 0.56+
 7 - LaTeX (optional)
 
 Specific Instruction for Distributions: 
 
Installation Instruction for Gentoo
This document assumes that the user has a basic software installed and setup with Gentoo such as: apache, postgresql which is not detailed in here.  If specific instruction are required please visit Gengoo Documentation web-page
  1.)  First lets check for required software
Code Listing 1: Checking for required software installation

 Login: root
  Password: (Your root password)
  # emerge -pv perl apache postgresql DBD-Pg DBI tetex
 
 If the output beside each package is [ebuild R ] it means the required packages are installed; if any output has [ebuild N ] beside the package, that package must be emerge
 
 [ebuild R ] dev-lang/perl-5.8.8-r2 USE="berkdb gdbm -build -debug -doc -ithreads -perlsuid" 9,887 kB
 [ebuild R ] www-servers/apache-2.2.4-r12 USE="ssl -debug -doc -ldap -mpm-event -mpm-itk -mpm-peruser -mpm-prefork -mpm-worker -no-suexec (-selinux) -static-modules -threads" 0 kB
 [ebuild R ] dev-db/postgresql-8.0.13 USE="nls pam perl python readline ssl zlib -doc -kerberos -pg-intdatetime (-selinux) -tcl -test -xml" 0 kB
 [ebuild R ] dev-perl/DBD-Pg-1.49 0 kB
 [ebuild R ] dev-perl/DBI-1.58 0 kB
 [ebuild R ] app-text/tetex-3.0_p1-r4 USE="X -Xaw3d -doc -lesstif -motif -neXt -tk" 352 kB
 
Note:  Emerge all required packages that are showed as [ebuild N ]
re-run the commend without the "-pv" switch

  Additional packages that are required are: perl-core/locale-maketext dev-perl/locale-maketext-lexicon g-cpan
 
 
Code Listing 2: Checking for required software installation

 # emerge -pv perl-core/locale-maketext dev-perl/locale-maketext-lexicon g-cpan
 
 Most of these packages will show up as [ebuild N ] install all required packages.
 
 These are the packages that would be merged, in order:
 
 Calculating dependencies... done!
 [ebuild N ] dev-perl/yaml-0.65 92 kB
 [ebuild N ] perl-core/i18n-langtags-0.35 30 kB
 [ebuild N ] dev-perl/Log-Agent-0.307 54 kB
 [ebuild N ] perl-core/locale-maketext-1.10 45 kB
 [ebuild N ] virtual/perl-locale-maketext-1.10 0 kB
 [ebuild N ] dev-perl/locale-maketext-lexicon-0.64 84 kB
 [ebuild N ] dev-perl/module-build-0.28.08 USE="-test" 192 kB
 [ebuild N ] dev-perl/ExtUtils-CBuilder-0.19 19 kB
 [ebuild N ] dev-perl/extutils-parsexs-2.18 25 kB
 [ebuild N ] dev-perl/Class-MethodMaker-2.10 88 kB
 [ebuild N ] dev-perl/Shell-EnvImporter-1.04 15 kB
 [ebuild N ] app-portage/g-cpan-0.15.0-r1 30 kB
 
   
2.)  Download the latest stable version LedgerSMB in our case it will be:  ledgersmb-1.2.7.tar.gz
Note: Don't forget to check GPG signature.
  As root copy  the package to path:  /usr/local
 Untar the package and change the ownership of all files in /ledgersmb sub-directories to "apache"
Code Listing 3: Checking for required software installation

 # cd /usr/local
 # cp /home/user_home_directory/ledgersmb-1.2.7.tar.gz .
 
 Assuming after downloading the package and verifing GPG signature the package is in your home directory;
 replace "user_home_directory" with your "home_name" usually your name.
 
  # tar -xzf ledgersmb-1.2.7.tar.gz
 # chown -R apache:apache ledgersmb/*
 
 
  3. Create a postgresql admin database role, by convention named 'ledgersmb':
Postgresql 8.0.x doesn't have switches: --no-superuser --no-createrole  so here is a code for both 8.0.x and 8.2.x

   
Code Listing 4: Create a postgresql admin database role

For postgresql 8.0.x
 
 $ createuser --createdb -U postgres --pwprompt --encrypted ledgersmb
  Enter password for new user:
  Enter it again:
  Shall the new user be allowed to create more new users? (y/n) y
  CREATE USER
 
 Note: password will not echo back to the screen
 
 For postgresql 8.2.x
 
 $ createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb
 Enter password for new user:
  Enter it again:
  Shall the new user be allowed to create more new users? (y/n) y
  CREATE USER
 
 The prompted password (referred to as MYROLEPASSWORD) will later be used in the DBConnect: string in the configuration file 'ledgersmb.conf'
 
 
   4.) Create a central user database, owned by the LedgerSMB admin role, 'ledgersmb_db':
 
  -U = user name to connect as
  -O = database user to own the new database
 
  the last name "ledgersmb_db" is the name of the database
  If you change these parameters you must be consistent throughout remaining installation
 
 
Code Listing 5: Create a central user database

$ createdb -U ledgersmb -O ledgersmb ledgersmb_db
 CREATE DATABASE
 
 
  5.) On the database that will store your user and session information, run the included Pg-central.sql SQL commands to configure the user, session tables, and functions:
 
 -U = user name to connect as
 -d =  specify database name to connect to
Code Listing 6: run the included Pg-central.sql SQL commands to configure the user, tables and functions

    $ psql -U ledgersmb -d ledgersmb_db -f /usr/local/ledgersmb/sql/Pg-central.sql
 
  -U = database user name has to be the same we created above
  -d = specify database name to connect to
 
 
  Note:  LedgerSMB's preferred configuration is to store the user and session management tables in a separate database from the company databases (aka 'datasets', created in admin.pl). If you are already working with or prefer to have your user and session tables in one company dataset, see further information in the manual.  You must have PLPGSQL installed in the dataset as well.  However that is beyond the scope of these instructions.

    6.) The SQL commands in step 5.) above created an LedgerSMB-managed admin user, e.g. a row in the users and users_conf table. You must now update the 'admin' user's password in users_conf from the default password.
Code Listing 7: update the 'admin' user's password

   
$ psql -U ledgersmb -d ledgersmb_db
ledgersmb_db=# UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;
ledgersmb_db=# \q

 (Change MYPASSWORD to your preferred administrative password, which is separate, but can be the same spelling as MYROLEPASSWORD).

 

   
7.) Edit the LEDGERPATH/ledgersmb.conf file.
Code Listing 8: Edit ledgersmb.conf file

   a.) As root change directory to /usr/local/ledgersmb
 Copy 'ledgersmb.conf.default' to 'ledgersmb.conf' and change owner to "apache"
 
  # cd /usr/local/ledgersmb
  # cp ledgersmb.conf.default ledgersmb.conf
  # chown apache:apache ledgersmb.conf
 
 b.) Make sure to set the section under [globaldb] to point to the central user and session database, using password MYROLEPASSWORD:
 
  # nano -w ledgersmb.conf
 
  [globaldb]
  DBname       = ledgersmb_db
  DBhost       = localhost
  DBport       = 5432
  DBUserName   = ledgersmb
  DBPassword   = MYROLEPASSWORD (set me to correct password)
 
  # chmod 640 ledgersmb.conf
 # chown apache:apache ledgersmb.conf
 
 

   
  8.) Add configuration to Apache by running enclosed script in /ledgersmb/configure_apache.sh
 
 
Code Listing 9: Add configuration to Apache

    # sh configure_apache.sh
  Which user does your web server run as? apache
  Where do we copy the ledgersmb-httpd.conf file to? /etc/apache2/vhosts.d
 
 
   9.) Check Dependencies
 
  The Build.PL script can be used to test for unmet dependencies and run other tests. It doesn't install anything yet, but it will tell you what you are missing. To check for dependencies, run (as user):
 
  Missing dependencies can generally be installed via a Linux distribution's package manager, or by CPAN. (Build.PL itself uses Module::Build, which is available in packages like perl-Module-Build or libmodule-build-perl.)
 
 
Code Listing 10: Check Dependencies

   # cd /usr/local/ledgersmb
 # perl Build.PL
 
 Sample output might look like this:
 
 Checking prerequisites...
  - ERROR: Config::Std is not installed
  - ERROR: MIME::Lite is not installed
  * Optional prerequisite Net::TCLink is not installed
  * Optional prerequisite Parse::RecDescent is not installed
 
 

   
The line starting with: "- ERROR:" must be dealt with, so these cpan modules must be installed the "Optional prerequisite" you can skip if you don't need them.
  Note:
  * Net::TCLink for credit card processing in a POS environment
  * Parse::RecDescent for the CLI script host
 
  if you will be doing anything related to creditcard processing you will need these two script as well.
  Installing the scripts is done by starting the "cpan" command shell:
Code Listing 11: Installing "capn modules

   # cpan
 
 ...
 If you do not want to enter a dialog now, you can answer 'no' to this
 question and I'll try to autoconfigure. (Note: you can revisit this
 dialog anytime later by typing 'o conf init' at the cpan prompt.)
 
 Are you ready for manual configuration? [yes] no
 
 Answer "no" above to autoconfigure.
 
   cpan> install Config::Std
 
  cpan> install MIME::Lite
 
 
  NOTE:
These scripts will run into a lot of dependencies and will ask you if you want to install them, the default will be [yes], example:
---- Unsatisfied dependencies detected during [A/AR/ARANDAL/Pod-Simple-3.05.tar.gz] -----
      Pod::Escapes
  Shall I follow them and prepend them to the queue
  of modules we are processing right now? [yes]
 
  Just hit "enter" to install them all.

   cpan> exit
 

   

 
Code 12: Edit pg_hba.conf

   # locate pg_hba.conf
 /var/lib/postgresql/data/pg_hba.conf
 
 # nano -w /var/lib/postgresql/data/pg_hba.conf
 
 
   Verify and/or edit pg_hba.conf and add or make sure it contains:
# TYPE  DATABASE       USER               CIDR-ADDRESS       METHOD
  local all            all                                   md5
   host  all            all                 127.0.0.1/32      md5
NOTE:  If it is a new installation insert or use the above settings, if you are running "SQL-Ledger" you can modify and thange it to to look like below:
  local       all      all                           trust
   host        all      all         127.0.0.1/32      trust
.Save the changes.
  Every time you make changes to "pg_hba.conf" you need to restart postgresql
Code 13: Restart postgresql

   # /etc/init.d/postgresql restart
 
 
  Verify that apache: httpd.conf file the line is not commented out:
Include /etc/apache2/vhosts.d/*.conf
Restart apache

   
 
10.) Once this is done and dependencies are satisfied, you can check to see whether the installation nominally works by running:
Code 14: Running Build test

   # ./Build test
 
 
  The test suites currently check to make sure all the perl modules load and that a number of numeric tests are passed.
 
  Dependencies which are recommended are needed only for specific functionality and may not be required in all circumstances. These include:
 
  * Net::TCLink for credit card processing in a POS environment
  * Parse::RecDescent for the CLI script host
 
 
 Using your favorite Browse go to:
 
  http://hostname/ledgersmb/admin.pl
 
  login with 'MYPASSWORD'
 
  Create dataset(s) with:
 
  User: ledgersmb
  Password: MYPASSWORD
 
  Superuser: postgres
  Password: (postgres password you created when installing postresql)
 
  Create one dataset (a postgresql database) 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 on Gentoo
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Sun Dec 02, 2007 11:04 am    Post subject: Reply with quote

Moved from Gentoo Chat to Unsupported Software.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Mon Dec 03, 2007 5:26 am    Post subject: Reply with quote

Note the overlay put the ebuild in
Code:
/usr/portage/local/layman/webapps-experimental/www-apps/ledgersmb

Note the ebuild puts everything in
Code:
/usr/share/webapps/ledgersmb/1.2.8

I get
Code:
1.2.8 # ls
conf          hooks     htdocs                      postinst-en.txt     sqlscripts
config-files  hostroot  installed_by_webapp_eclass  server-owned-files

Looking over the ebuild and my apache install I am unclear what "setting" the script is talking about in this error message
Code:
Fatal error: Please "emerge >=net-www/apache-1.3" or correct your settings

Must be the install script.
I will look at it.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
chynnasmith
n00b
n00b


Joined: 05 Dec 2007
Posts: 3
Location: United States

PostPosted: Wed Dec 05, 2007 12:03 pm    Post subject: LedgerSMB Reply with quote

It's great thing that you guys shared these codes. I'm still learning to use it.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Fri Dec 07, 2007 4:08 pm    Post subject: Reply with quote

chynnasmith: did you get ledger smb working?
The problem I am having is with webapp-config
Code:
/usr/sbin/webapp-config -I -h localhost -u root -d /ledgersmb ledgersmb 1.2.8
* Fatal error: Your configuration file sets the server type "Apache"
* Fatal error: but the corresponding package does not seem to be installed!
* Fatal error: Please "emerge >=net-www/apache-1.3" or correct your settings.
* Fatal error(s) - aborting

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 15, 2007 7:34 pm    Post subject: Reply with quote

Status report: my problem above was that I did not have the apache2 use flag set.
I was able to get webapp-config to finish successfully.
now I get
Quote:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache Server at localhost Port 80

so I must not be understanding the configuring apache part.

EDIT:
Quote:
Code Listing 10: Check Dependencies

# cd /usr/local/ledgersmb
# perl Build.PL

Sample output might look like this:

Checking prerequisites...
- ERROR: Config::Std is not installed
- ERROR: MIME::Lite is not installed
* Optional prerequisite Net::TCLink is not installed
* Optional prerequisite Parse::RecDescent is not installed
This is the step webapp-config gets you to iguess because my error above is related to
Code:
[Sat Dec 15 11:33:11 2007] [error] [client ::1] Can't locate Class/Std.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/vendor_perl/5.8.8/i686-linux /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/local/lib/site_perl .) at /usr/lib/perl5/vendor_perl/5.8.8/Config/Std.pm line 19.
in my apache2 error log.

EDIT#2 well it seems the ebuild in the portage overlay does not include the file named Build.pl.
Code:
find / -iname 'Build.pl'
lapcat 1.2.8 # find / -iname '*uild.pl'
lapcat 1.2.8 # find / -iname '*ld.pl'
/usr/lib/perl5/5.8.8/unicore/To/Fold.pl
lapcat 1.2.8 #


And the directory layout is different:
Code:
cd /usr/local/ledgersmb
bash: cd: /usr/local/ledgersmb: No such file or directory
lapcat apache2 # cd /usr/share/webapps/ledgersmb/1.2.8
lapcat 1.2.8 # ls
conf          hooks     htdocs                      postinst-en.txt     sqlscripts
config-files  hostroot  installed_by_webapp_eclass  server-owned-files


Code:
lapcat 1.2.8 # cd htdocs/
lapcat htdocs # ls
admin.pl   cp.pl        ic.pl              ledgersmb.conf.default  menu.ini     sl2ls.sh
am.pl      css          import_members.pl  ledger-smb.eps          menu.pl      spool
ap.pl      ct.pl        index.html         ledger-smb.gif          oe.pl        sql
ar.pl      custom.pl    ir.pl              ledgersmb-httpd.conf    pe.pl        t
bin        drivers      is.pl              ledger-smb.png          pos.conf.pl  templates
bp.pl      favicon.ico  jc.pl              ledger-smb_small.png    ps.pl        upgrade-templates.pl
ca.pl      gl.pl        LedgerSMB          locale                  rc.pl        users
common.pl  hr.pl        ledgersmb.conf     login.pl                rp.pl
lapcat htdocs # cd bin/
lapcat bin # ls
aa.pl     ap.pl       ar.pl  cp.pl   gl.pl  io.pl  jc.pl     oe.pl   ps.pl  rp.pl
admin.pl  arap.pl     bp.pl  ct.pl   hr.pl  ir.pl  login.pl  pe.pl   pw.pl
am.pl     arapprn.pl  ca.pl  custom  ic.pl  is.pl  menu.pl   pos.pl  rc.pl

EDIT#3 well it seems like the "root" dir of the application is
Code:
/var/www/localhost/htdocs/ledgersmb

_________________
Donate to Gentoo


Last edited by turtles on Sat Dec 15, 2007 8:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 15, 2007 8:25 pm    Post subject: Reply with quote

Well in step 5 or code listing 5 above
Quote:
5.) On the database that will store your user and session information, run the included Pg-central.sql SQL commands to configure the user, session tables, and functions:

-U = user name to connect as
-d = specify database name to connect to
Code Listing 6: run the included Pg-central.sql SQL commands to configure the user, tables and functions

$ psql -U ledgersmb -d ledgersmb_db -f /usr/local/ledgersmb/sql/Pg-central.sql

-U = database user name has to be the same we created above
-d = specify database name to connect to
ther is no such file or directory.
And I have 2 options:
Code:
find / -iname 'Pg-central.sql'
/usr/share/webapps/ledgersmb/1.2.8/htdocs/sql/Pg-central.sql
/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql


so not sure which to use here.
Both are owned by root so that doesnt make a difference.

Edit well I went with:
Code:
psql -U ledgersmb -d ledgersmb_db -f /var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql
BEGIN
psql:/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql:8: NOTICE:  CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
psql:/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql:8: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
psql:/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql:8: NOTICE:  CREATE TABLE / UNIQUE will create implicit index "users_id_key" for table "users"
CREATE TABLE
COMMENT
psql:/var/www/localhost/htdocs/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 17254 1
INSERT 17255 1
CREATE FUNCTION
COMMENT
CREATE FUNCTION
COMMENT
psql:/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql:76: NOTICE:  CREATE TABLE will create implicit sequence "session_session_id_seq" for serial column "session.session_id"
psql:/var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql:76: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "session_pkey" for table "session"
CREATE TABLE
COMMIT
seemed to run OK.
seems like /var/www/ is where the web application "is".
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 15, 2007 8:46 pm    Post subject: Reply with quote

OK now looking at the listing 10 cpan stuff.
It does not seem to be the gentoo way.
emerge will have no way of knowing about these perl cpan modules unless they are made with g-cpan?

Edit#1 code listing 10:
If you have not emerged g-cpan do so:
Code:
emerge -av g-cpan

Code:
 g-cpan -i Config::Std 

etc etc..
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 15, 2007 8:57 pm    Post subject: Reply with quote

stumbeling right along here!
Now after making a database and doing the g-cpan stuff I get
Quote:
Error!
No GlobalDBH Configured or Could not Connect

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Dec 15, 2007 10:13 pm    Post subject: Reply with quote

Well it was my silly database name! was wrong in smb ledger.conf
Code:
cd  /var/www/localhost/htdocs/ledgersmb

Code:
perl -MLedgerSMB::Sysconfig -e print

Gave me the clues i needed.
Now I have got it running.
I have no idea what my admin password is or how to import old sql-ledger data yet but working on that.

EDIT #1

Code:
psql -U ledgersmb -d ledgersmb

You will then get to the PostgreSQL shell where you run
Code:
UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;

to change the password. Replace MYPASSWORD with a password of your choice.
Type
Code:
\q

to leave the PostgreSQL shell and then
Code:
exit

Now I am setting up a test company in the admin screen. ledgersmb does not let me change the admin password or set up a company.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
pjeutr
n00b
n00b


Joined: 29 Aug 2006
Posts: 21

PostPosted: Sat Mar 01, 2008 11:19 am    Post subject: Reply with quote

this is how I got things to work with ledgersmb-1.2.13, The dependecies for cpan abd g-cpan aren't solved the right way, but it worked for me.
Would be nice if someone would take care of this ebuild, it looks more promising than sql-ledger?

Because the old ebuild that was included with ledgersmb didn't work anymore, I made these changes
-added www-servers/apache, removed old apache package
-added app-portage/g-cpan, removed gcpan stuff that didn't work, dunno if this is ok
-removed cpan stuff that didn't work, dunno how to do it in ebuild, so will have to do it by hand
-add cp ledgersmb.conf.default ledgersmb.conf

Code:

# Copyright 1999-2006 The LedgerSMB Team
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit depend.apache webapp eutils

DESCRIPTION="LedgerSMB"
HOMEPAGE="http://ledger-smb.sourceforge.net/"
SRC_URI="mirror://sourceforge/ledger-smb/${P}.tar.gz"
#SRC_URI="http://eva.a.jjayr.com/lsmb-package/${P}.tar.gz"

# don't use the gentoo mirrors yet, we're not there.
RESTRICT='mirror'

LICENSE="GPL-2"
KEYWORDS="x86 ppc"

# no use flag for now
IUSE=""

DEPEND=""
RDEPEND=">=dev-db/postgresql-8
   >=dev-lang/perl-5.8
   dev-perl/DBI
   www-servers/apache
   >=dev-perl/Class-MethodMaker-2.08
   >=dev-perl/Log-Agent-0.307
   >=dev-perl/Shell-EnvImporter-1.04
   >=app-portage/g-cpan-0.15_rc3
   >=perl-core/i18n-langtags-0.35
   >=dev-perl/HTML-Tagset-3.10
   app-portage/g-cpan
   >=dev-perl/Parse-RecDescent-1.94
   >=dev-perl/MIME-Lite-3.01
   >=perl-core/locale-maketext-1.10
   >=dev-perl/HTML-Parser-3.56
   >=virtual/perl-locale-maketext-1.10
   >=dev-perl/locale-maketext-lexicon-0.62"

S=${WORKDIR}/${PN}

src_unpack() {
   unpack ${A}
}

src_install() {
   webapp_src_preinst

   webapp_server_configfile apache ${S}/dists/gentoo/ledger-smb-httpd-gentoo.conf

   cp ledgersmb.conf.default  ledgersmb.conf
   cp -R ${S}/* ${D}/${MY_HTDOCSDIR}

   # LedgerSMB needs to write to the users directory
   webapp_serverowned -R ${MY_HTDOCSDIR}/spool/
   webapp_postinst_txt en ${S}/dists/gentoo/post-install.txt

   webapp_src_install
}


put the ebuild in /usr/local/portage/app-office/sql-ledger/ledgersmb-1.2.13.ebuild
>ebuild ledgersmb-1.2.13.ebuild digest
>emerge -av ledgersmb

-add the following to /etc/apache2/vhosts.d/default_vhost.include
Code:

<Directory /var/www/localhost/htdocs//ledgersmb>
  AllowOverride All
  AddHandler cgi-script .pl
  Options ExecCGI Includes FollowSymlinks
  Order Allow,Deny
  Allow from All
</Directory>

<Directory /var/www/localhost/htdocs//ledgersmb/users>
  Order Deny,Allow
  Deny from All
</Directory>

-install cpan stuff by hand
>cpan
>> install Class::Std
>> install Config::Std

>/etc/init.d/apache2 restart


Do db stuff
>createuser --no-superuser --createdb --no-createrole -U postgres --pwprompt --encrypted ledgersmb
>createdb -U ledgersmb -O ledgersmb ledgersmb
>psql -U ledgersmb -d ledgersmb -f /var/www/localhost/htdocs/ledgersmb/sql/Pg-central.sql
>psql -U ledgersmb -d ledgersmb
ledgersmb=> UPDATE users_conf SET password = md5('MYPASSWORD') WHERE id = 1;

-change the db-password in ledgersmb.conf
-goto http://localhost/ledgersmb/admin.pl
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Tue Mar 04, 2008 3:51 am    Post subject: Reply with quote

I am starting on porting our database over any one with some notes, tips or a how to?

I edited my post above
To get some more of a how to since I am installing this on 2 more boxes today.
1) Need to make a page in the wiki for this. how do we add a page to gentoo wiki?
2) Need to find out how to make an ebuild deal interactivly with g-cpan modules, the apache files and postgres files and updates.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sun Sep 20, 2009 3:06 am    Post subject: Reply with quote

Are you already using LedgerSMB?
I was trying to follow your instruction to install it from overlay but the version in overlay in only 1.2.8 and they have new 1.3.0
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Sun Sep 20, 2009 6:25 am    Post subject: Reply with quote

Trying to install one of LedgerSMB requirement:
6 - Locale::Maketext::Lexicon 0.56+

but I'm getting collision:
Code:

g-cpan -i Locale::Maketext::Lexicon

...
* package dev-perl/locale-maketext-lexicon-0.64 NOT merged
 *
 * Detected file collision(s):
 *
 *      /usr/bin/xgettext.pl


Any idea how to go around it?
Back to top
View user's profile Send private message
step
Apprentice
Apprentice


Joined: 16 May 2002
Posts: 198

PostPosted: Wed Jun 30, 2010 8:36 pm    Post subject: Reply with quote

Thank you for all the information but this is out of date by now :)

Can you please write a new and updated instructions to http://en.gentoo-wiki.com/wiki/LedgerSMB page?
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jun 30, 2010 8:47 pm    Post subject: Reply with quote

step wrote:
Thank you for all the information but this is out of date by now :)

Can you please write a new and updated instructions to http://en.gentoo-wiki.com/wiki/LedgerSMB page?


I've not switched to LedgerSMB yet; I'm still using SQL-Ledger.
Originally I've installed one of their LedgerSMB version but I had a problem getting support from LedgerSMB forum to transfer my date to LedgerSMB; so I never try using it in production.

LedgerSMB forum does not have a good support, at least in my case when I needed one :-/
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Sat Jul 03, 2010 9:13 pm    Post subject: Reply with quote

step wrote:
Thank you for all the information but this is out of date by now :)

Can you please write a new and updated instructions to http://en.gentoo-wiki.com/wiki/LedgerSMB page?

Vote for Bug 251584
What in the above instructions is outdated?
(except that I have been using it since I posted that)
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Mon Jul 05, 2010 7:08 pm    Post subject: Reply with quote

turtles wrote:
step wrote:
Thank you for all the information but this is out of date by now :)

Can you please write a new and updated instructions to http://en.gentoo-wiki.com/wiki/LedgerSMB page?

Vote for Bug 251584
What in the above instructions is outdated?
(except that I have been using it since I posted that)


Just posted my addition to the bug.
I have to try the new instruction and see hot it goes. It might be easer to start with SMB-Ledger from when you are doing it from scratch but when somebody has larger inventory setup with SQL-Ledger the transition is not easy.
Besides, my other problem is that my inventory is in USD even though I'm in Canada.
So I don't know if there is any easy transition for me, if at all.
When I'm placing an order with supplier they are all in USD, so I need USD pricing on PO's and invoices. I'm selling in USD and CAD dollars as well.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1650

PostPosted: Thu Jul 08, 2010 8:46 am    Post subject: Reply with quote

I updated the ebuild to version 1.2.18

(Alpha) Steps for this version:
Code:
g-cpan -i Config-Std


Get the ebuild:
wget https://bugs.gentoo.org/attachment.cgi?id=23799

Make a custom overlay for ledgersmb:

cd /usr/portage/local/

If there is not one make a directory www-apps
and in that directory ledgersmb.

Move the ebuild there:
and rename it ledgersmb-1.2.18.ebuild

Code:
ebuild ledgersmb-1.2.18.ebuild digest


Code:
emerge -av ledgersmb


continue with installation instructions as above.
EDIT:
Perl dependencies not in portage and not found by build.pl should be installed with g-cpan. that will ensure they stay up to date. That is what I had to do for dev-perl/DBD-Pg and all the others.

If you get a error about role "apache" does not exist in /var/www/localhost/blablabla...
On the admin.pl page it means your user name or password is incorrect.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
lkraav
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2004
Posts: 129
Location: Estonia

PostPosted: Sat Mar 17, 2012 2:39 pm    Post subject: Reply with quote

here's one more now jumping on the ledgersmb wagon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum