[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setup.pl error on fresh 1.5 installation

Hi Silver,

On 07/06/16 14:54, Silver Salonen wrote:
On Tue, Jun 7, 2016 at 12:10 AM, Silver Salonen <..hidden..> wrote:
On 07.06.2016 00:00, Erik Huelsmann wrote:
FreeBSD uses its own rc scripts. The standard one for Starman can be seen here: https://svnweb.freebsd.org/ports/head/www/p5-Starman/files/starman.in?revision=340872&view=markup

I then defined the startup like this in /etc/rc.conf:
starman_flags="-I /usr/local/www/ledgersmb15/lib/ --listen :5055 --error-log /var/log/starman.log"

But that way includes were missing, configuration could not be found etc. When I use my own script then it works.

Ok. What you could do, possibly, is changing the starman.psgi file to include:

chdir "/usr/local/www/ledgersmb15";

as the first line after the shebang -- that is before any other - actual-code. If that doesn't work, you might consider:

  chdir ...;

Yep, the one with BEGIN made the official rc script work :)

Great news! Do you have anything you want/need us to add to http://ledgersmb.org/topic/installing-ledgersmb-15 or https://github.com/ledgersmb/LedgerSMB/blob/master/README.md based on your installation experience?

I'll see if it's possibly to have a ledgersmb.conf option to set the chdir target to simplify this.
Well, as far as I can recall right now, the only FreeBSD specific nuances were:
  • Link perl binaries /usr/local/bin/perl* to /usr/bin/, something like: for b in /usr/local/bin/perl*; do ln -s $b /usr/bin/ ; done
Generally this would be done by setting one of the PERL environment variables rather than doing lots of symlinking.
Drop by in the IRC channel or Matrix room to discuss this if you like (I'm dcg_mx there and generally around if Erik (ehuelsmann) isn't)
  • Install all the missing CPAN modules (I did it basically one-by-one from FreeBSD ports system, checking errors on each try, but I guess using 'cpanm' method should do the trick too, and a bit easier).
  • Install p5-Starman and add those aforementioned lines to /etc/rc.conf
  • Start it up with: /usr/local/etc/rc.d/starman start

Also, not related to FreeBSD, to make Apache proxy really work I also added ProxyPass line, so those are:
        ProxyPass / http://localhost:5055/
        ProxyPassReverse / http://localhost:5055/

One more change necessary for using the rc script - in lib/LedgerSMB/Sysconfig.pm:
my $cfg = Config::IniFiles->new( -file => "/usr/local/www/ledgersmb15/conf/ledgersmb.conf" ) || die @Config::IniFiles::errors;

Otherwise it couldn't find the configuration file.
The reason it couldn't find the config file is it is supposed to be in (for your instaqllation)

I'm currently working on a complete re-write of Sysconfig.pm so will consider testing for the config file in /conf as well.

David G

What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
Ledger-smb-users mailing list