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

Re: postgresql settings in fedora 18?



On Thu, 5 Dec 2013 05:54:43 -0800
Chris Travers <..hidden..> wrote:

> On Thu, Dec 5, 2013 at 4:33 AM, ario <..hidden..>
> wrote:
> 
> > On Wed, 4 Dec 2013 22:12:14 -0800
> > ..hidden.. wrote:
> >
> > > When I need to set up a postgresql and fedora VM I check out:
> > >
> > >
> > http://docs.fedoraproject.org/en-US/Fedora/13/html/Managing_Confined_Services/sect-Managing_Confined_Services-PostgreSQL-Configuration_Examples.html
> > >
> > > Is that what your looking for?
> >
> > If it means that the ledgersmb database is stored
> > in /var/lib/pgsql/data, yes.
> >
> > About the rest I can't be sure as I don't run F13.
> > Funny though, in the Qubes-OS F18's Selinux is disabled...
> > Further, there is no /etc/rc.d/init.d/postgresql
> >
> > Also, in my setup the commands
> > echo $PGDATA
> > and
> > echo $PGLOG
> > return an empty string.
> > Does that mean there' s something wrong?
> >
> > I understand there are 3 entities at work here:
> > 1. httpd service
> > 2. postgresql service
> > 3. ledgersmb scripts somehow in between those.
> >
> 
> Yes.
> 
> >
> > In my setup it goes wrong when I connect to port 5432.
> > So, I was thinking, httpd would have to know what to do with port
> > 5432.
> >
> 
> Actually HTTP hands it off to LSMB which hands it off (indirectly) to
> the PostgreSQL client libraries, effectively.  It's slightly more
> complex than that, but that's a general idea.

Ok, but, my point was: If I do a page request
(http://127.0.0.1:5432/ledgersmb), how does httpd know 
1. to listen to port 5432 without being instructed to do so?
2. to only pass the request through to lsmb if it comes through port
5432?

> > I assume that would have to put in
> > the /etc/httpd/conf.d/ledgersmb.conf which I assume it reads during
> > its start.
> >
> 
> Not really.  This is handled internally by LedgerSMB.
> 
> Well, apparently not, because there's no mention of 5432 in that file.
> > Another conf file then? None of them mentions what to do with a page
> > request on port 5432.
> >
> 
> 5432 is the default port. 

Yes, but according to which conf file?

> If you want to change the port, you do it
> in the ledgersmb.conf in your ledgersmb directory (for example,
> /usr/local/ledgersmb/ledgersmb.conf).  The client libraries use 5432
> if no other port is specified.

My intuition tells me that httpd should be specifically instructed to
allow connections on 5432, and to funnel only those connections to
'ledgersmb'.
In my config files I couldn't find any setting of 5432, and, as a
consequence I think, and what I posted somewhere else in this thread,
my system only gives me the login and setup screen if I connect on
port 80 to ledgersmb.
And I have no idea why my F18 system seems to
behave so differently (it's not the first time I tried to install lsmb
on F18, until today to no avail--but hey, back then I didn't even try
to connect simply through port 80), except for that one little
commented-out remark in /var/lib/pgsql/data/postgresql.conf file, that
on Fedora/RHEL/CentOS listening on port 5432 should be accounted for
not there, but in the 'service file', whatever they might mean by that
vague indication.




> > I'm afraid this means I absolutely don't understand what's going
> >> > on,
> > i.e. as a start, how httpd works.
> >
> 
> 5 min. introduction (probably better at the -devel list but oh well):
> 
> 1.  httpd receives your browser's request.
> 2.  httpd hands it off to ledgersmb, either as a CGI script, or via
> FCGI. 3.

I never worked with, nor do I understand or 'speak', CGI, but wasn't it
a perl file login.pl?

>  LedgerSMB connects to the db, does what you need it to and
> then disconnects.  It returns its output to httpd.
> 4.  httpd sends that output to your browser.
> 
> 
> 
> > Time for the documentation, I guess...
> >
> 
> I am wondering if there would be interest for entry level LedgerSMB
> courses, perhaps over Skype, or with video/screencasts with some
> extra one on one time.  It might be a good way to help provide a
> basic understanding of how everything works together, etc, allow for
> a little direct instruction, and the like.

I think a shortlist with a detailed) layout of the (default) structure
of the system would already be very helpful.
I.e. something like:
A page request reaches the server, which is instructed through 'a'
conf file (in this case 'ledgersmb.conf', but I feel
it could have any name as long as the content makes
it work) in /etc/http/conf.d/ to call the ledgersmb login.pl
in /usr/share/pgsql/ IF the request comes in on port 5432.
This login script then logs into the pgsql server which, instructed
through its pg_hba.conf in /var/lib/pgsql/data/ allows the login.

Or some sheets with a graphical presentation of the default setup
with absolutely clear pointers of what is where and what has which
user/permission settings would also make things easier to understand
(and more difficult to mess up).
In order that people don't need to be a developer in order to
understand what's going on. Something with boxes, arrows and config
file entries for clarification of the structure of the whole process.
I am missing this, but in no way am I asking you to provide such
documentation. Especially not now it seems to (almost) work here :)


Kind regards and thanks for the great job of giving us lsmb,
ario




------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users