Dependencies of Freeradius 2.0.5

Alan DeKok aland at deployingradius.com
Mon Jun 23 08:14:12 CEST 2008


Leander S. wrote:
> I know about radius -X ... I already setted up the version 1.1.7
> succesfully ... but now I'm working on almost complety revised version
> 2.0.5 ... so SQL configs are different for me and I might made some
> mistakes there so that the radius -X is not showing me some pg code ... ;/

  As always, start off with the default config.

> ./configure --with-your-personal-options  | grep WARNING
> 
> --> There is nothing saying anything about sql , or pg or postgres in
> ./configure --help ...

  There is *generic* help for configuring modules.  If there was a few
lines of text for every module, the "configure --help" output would be
huge... and no ne would read it.

> You may want to give me an example especialy for postgres ?! Would be
> great.
> --> I also tryed: ./configure --with-postgresql=YES
> --enable-postgresql=YES --with-rlm-postgresql-lib-dir=/usr/local/lib/
> --with-rlm-postgresql-include-dir=/usr/local/lib/
> --> But I haven't had more luck than before .. and also no more WARNING
> messages to read than I've had before .. so there might be something
> wrong ...

  Try reading the output of configure.  Look for "postgres".  It will
show lots of messages about what it's doing to find postgres.

> But anyway .. here's how I used to run it usually ... because you said
> it trys to build as much modules as possible if the neccessary software
> stuff like postgresql-server/client is already preinstalled ... so
> postgres support for freeradius should work also ... but .. sadly .. it
> won't do it yet for me ... ;)

  I'm not convinced of that, to be honest.

> root /usr/src/freeradius-server-2.0.5 #  ./configure | grep WARNING
...
> ... ^^ which looks fine for me so far ... because I only need PostgreSQL
> ... not Oracle or MySQL.

  Yes.  It looks like the postgres module *is* being built.

> but if I now go ahead and do: # ./configure, gmake, gmake install

  Blindly?  Without reading the output?  Why?

  If you're having issues getting something to work, the READ.  The
reason the configure && make && make install process prints out messages
is for you to READ THEM.  If everything works, most of the output can be
ignored.  If something goes wrong, you need to READ THE OUTPUT.

  Did you read the output to see if it *did* build && install the
postgresl module?  If not, why?

> and
> finally run radius -X it shows me not even one time anything about pg or
> postgres module ...:

  Let me guess: You didn't configure the server to use SQL.  You didn't
un-comment SQL in any of the examples.  You didn't configure sql.conf to
point to your postgresql database.

  If SQL isn't configured, the server won't load it.  If SQL is
configured, the server will load it.  If SQL is configured, AND the
Postgresql module wasn't built, the server will print out error
messages, and refuse to start.

  IIRC, you were told this earlier, too.

> no more sql infomation ^^ postgresql seems not even to be loaded when
> radius starts ...

  Because you didn't tell the server it needed to use SQL.

> a step further I noticed there is even no module in:
> 
> root /usr/src/freeradius-server-2.0.5 #  ls -lach
> /usr/local/etc/raddb/modules/

  <sigh>  The file is in raddb/sql.conf.  It's not hard to find the
file.  Honest.  It's in the same place as in 1.1.7.  Or, just read
radiusd.conf.  Or use "grep".  It's a wonderful tool that comes with
most Unix systems.

  And I take the inability to find sql.conf as proof that you haven't
configured the server to use SQL.  And you haven't configured SQL to use
postgres.  So the server won't use SQL, because you haven't told it to
use SQL.

> so it might be still missed .. but what part is missed to get postgresql
> support?

  You need to tell the server to use SQL.  Just like in 1.1.7.  You need
to tell the SQL module to load postgres.  Just like in 1.1.7.

> I already do have PostgreSQL Server 8.3 compiled and
> successfully running and I also do have PostgreSQL Client 8.1 also
> already installed from binary to my FreeBSD.. so WTF? ;) ??

  The server doesn't know the postgresql admin name or password.  So it
can't magically start using postgres as soon as the postgres module is
built.  You have to edit the default configs.

  Alan DeKok.



More information about the Freeradius-Users mailing list