Hi, I would like to get Freeradius working with a PostgreSQL database: are there any handy HOWTOs or Tutorials that explain how to do this? I am running RedHet EL5. Relevant Packages: freeradius2.x86_64 2.1.7-2.el5 installed freeradius2-libs.x86_64 2.1.7-2.el5 installed freeradius2-postgresql.x86_64 2.1.7-2.el5 installed freeradius2-python.x86_64 2.1.7-2.el5 installed freeradius2-utils.x86_64 2.1.7-2.el5 installed postgresql.x86_64 8.1.11-1.el5_1.1 installed postgresql-libs.i386 8.1.11-1.el5_1.1 installed postgresql-libs.x86_64 8.1.11-1.el5_1.1 installed postgresql-server.x86_64 8.1.11-1.el5_1.1 installed Regards, Dave
* Sparkes, David <David.Sparkes@keymile.com> [2009-10-15 11:21]:
I would like to get Freeradius working with a PostgreSQL database: are there any handy HOWTOs or Tutorials that explain how to do this?
It's pretty easy, just study the docs and sample configs. Just a warning: You might run into the same problem as me, so test it thorougly before putting it in production. I'm running Freeradius (latest version) against a PostgreSQL database, and it crashes every other day or so when running normally (as a deamon). It doesn't crash in debug mode (-X), so I have to let it run like that for a while more, until I have the time to debug it. Can't risk a sudden stop for the time being. -- Vegard Svanberg <vegard@svanberg.no> [*Takapa@IRC (EFnet)]
Sorry, I should clarify. I have spent some time looking through the docs including, http://wiki.freeradius.org/SQL_HOWTO, but that is the wrong version of FreeRadius (1.1.7) and doesn't work. I was looking for something a bit more up-to-date. Cheers, Dave -----Original Message----- From: freeradius-users-bounces+david.sparkes=keymile.com@lists.freeradius.org [mailto:freeradius-users-bounces+david.sparkes=keymile.com@lists.freerad ius.org] On Behalf Of Vegard Svanberg Sent: Thursday, October 15, 2009 11:31 AM To: FreeRadius users mailing list Subject: Re: Postgres * Sparkes, David <David.Sparkes@keymile.com> [2009-10-15 11:21]:
I would like to get Freeradius working with a PostgreSQL database: are there any handy HOWTOs or Tutorials that explain how to do this?
It's pretty easy, just study the docs and sample configs. Just a warning: You might run into the same problem as me, so test it thorougly before putting it in production. I'm running Freeradius (latest version) against a PostgreSQL database, and it crashes every other day or so when running normally (as a deamon). It doesn't crash in debug mode (-X), so I have to let it run like that for a while more, until I have the time to debug it. Can't risk a sudden stop for the time being. -- Vegard Svanberg <vegard@svanberg.no> [*Takapa@IRC (EFnet)] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
Sorry, I should clarify. I have spent some time looking through the docs including, http://wiki.freeradius.org/SQL_HOWTO, but that is the wrong version of FreeRadius (1.1.7) and doesn't work.
had a quick look through - seems to be reasonbly fine - which bit didnt work? whats your issue - eg radiusd -X alan
Hi again, Radius works fine. I've been using it for a few weeks with no hitches. I was working through the example to set up PostGres; I just was thrown when I tried to set up the database ("Setting up the RADIUS database" section), as I reached these lines: cd /usr/share/doc/packages/freeradius/doc/examples/ psql -U radius radius < postgresql.sql Of which I couldn't find the equivalent. The closest I could find was /usr/share/doc/freeradius-2.1.7/examples/postgresql_update_radacct_group _trigger.sql, which caused all kinds of scary error messages, which put me off. It occurs to me in the cold light of day that maybe this section probably just creates the example tables, and the above example file is completely inappropriate, but, at the time, I was in black box mysticism mode. I wrote the SQL to create similar tables to those shown, but stopped, because I thought that the basic database part was importing something more clever into the database. I've probably overthought it and can just get on with the configuration, then. Thanks, Dave -----Original Message----- From: freeradius-users-bounces+david.sparkes=keymile.com@lists.freeradius.org [mailto:freeradius-users-bounces+david.sparkes=keymile.com@lists.freerad ius.org] On Behalf Of Alan Buxey Sent: Thursday, October 15, 2009 12:11 PM To: FreeRadius users mailing list Subject: Re: Postgres Hi,
Sorry, I should clarify. I have spent some time looking through the docs including, http://wiki.freeradius.org/SQL_HOWTO, but that is the wrong version of FreeRadius (1.1.7) and doesn't work.
had a quick look through - seems to be reasonbly fine - which bit didnt work? whats your issue - eg radiusd -X alan - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sparkes, David wrote:
I was working through the example to set up PostGres; I just was thrown when I tried to set up the database ("Setting up the RADIUS database" section), as I reached these lines:
cd /usr/share/doc/packages/freeradius/doc/examples/ psql -U radius radius < postgresql.sql
See raddb/sql/postgresql/. Everything for postgres is there. Alan DeKok.
On 10/15/2009 07:01 AM, Alan DeKok wrote:
Sparkes, David wrote:
I was working through the example to set up PostGres; I just was thrown when I tried to set up the database ("Setting up the RADIUS database" section), as I reached these lines:
cd /usr/share/doc/packages/freeradius/doc/examples/ psql -U radius radius< postgresql.sql
See raddb/sql/postgresql/. Everything for postgres is there.
Just for clarity, using the Red Hat packages (sice the OP did state this is RHEL) that would be /etc/raddb/sql/postgresql and requires the freeradius-postgresql subpackage to be installed. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
Hi again, Ok... well I have created the tables using /etc/raddb/sql/postgresql/schema.sql and populated the tables manually. However no postgresql.conf file exists in either /etc/raddb/sql/postgresql or /etc/raddb/postgresql. Have I missed a package that would include this or should I just create it from scratch? Looking at the examples that I've found, it seems to be a fairly straightforward file to understand, if large. If I'd known that the table name and SQL queries were defined in postgresql.conf, I wouldn't have bothered to recreate the tables according to the schema. ;) For the record, all of the configuration files are in /etc/raddb/postgresql in this install. Regards, Dave -----Original Message----- From: freeradius-users-bounces+david.sparkes=keymile.com@lists.freeradius.org [mailto:freeradius-users-bounces+david.sparkes=keymile.com@lists.freerad ius.org] On Behalf Of John Dennis Sent: Thursday, October 15, 2009 2:35 PM To: FreeRadius users mailing list Subject: Re: Postgres On 10/15/2009 07:01 AM, Alan DeKok wrote:
Sparkes, David wrote:
I was working through the example to set up PostGres; I just was thrown when I tried to set up the database ("Setting up the RADIUS database" section), as I reached these lines:
cd /usr/share/doc/packages/freeradius/doc/examples/ psql -U radius radius< postgresql.sql
See raddb/sql/postgresql/. Everything for postgres is there.
Just for clarity, using the Red Hat packages (sice the OP did state this is RHEL) that would be /etc/raddb/sql/postgresql and requires the freeradius-postgresql subpackage to be installed. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 10/15/2009 09:17 AM, Sparkes, David wrote:
Hi again,
Ok... well I have created the tables using /etc/raddb/sql/postgresql/schema.sql and populated the tables manually.
However no postgresql.conf file exists in either /etc/raddb/sql/postgresql or /etc/raddb/postgresql. Have I missed a package that would include this or should I just create it from scratch?
There isn't a postgresql.conf file. You edit /etc/raddb/sql.conf and set the database to postgresql.
For the record, all of the configuration files are in /etc/raddb/postgresql in this install.
Not if you're using our packages. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
Hi again, Thanks for the help. It is running correctly. Regards, Dave -----Original Message----- From: freeradius-users-bounces+david.sparkes=keymile.com@lists.freeradius.org [mailto:freeradius-users-bounces+david.sparkes=keymile.com@lists.freerad ius.org] On Behalf Of John Dennis Sent: Thursday, October 15, 2009 3:45 PM To: FreeRadius users mailing list Subject: Re: Postgres On 10/15/2009 09:17 AM, Sparkes, David wrote:
Hi again,
Ok... well I have created the tables using /etc/raddb/sql/postgresql/schema.sql and populated the tables manually.
However no postgresql.conf file exists in either /etc/raddb/sql/postgresql or /etc/raddb/postgresql. Have I missed a package that would include this or should I just create it from scratch?
There isn't a postgresql.conf file. You edit /etc/raddb/sql.conf and set the database to postgresql.
For the record, all of the configuration files are in /etc/raddb/postgresql in this install.
Not if you're using our packages. -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi,
I would like to get Freeradius working with a PostgreSQL database: are there any handy HOWTOs or Tutorials that explain how to do this?
some stuff here: http://wiki.freeradius.org/Rlm_sql basically, FreeRADIUS comes with the required SQL schema for RADIUS and NAS access with SQL (postgres, mysql, oracle or mssql). you will need to apply this schema to your SQL - after creating a suitable user and database for it. then you need to configure the relevant $raddb/sql/* stuff and add the required bit to $raddb/sql.conf once you have configured the SQL, you can then add it as a call in the main server(s) - either 'sql' or with whatever name you called the SQL instance (if you have multiple SQL configs). basically, configure sql.conf configure sql/postgresql/* edit sites-enabled/* (as appropriate) to call the SQL stuff in authen/author/acct/etc check debug logs thoroughly to see why/what and how things work/dont work alan
participants (5)
-
Alan Buxey -
Alan DeKok -
John Dennis -
Sparkes, David -
Vegard Svanberg